Create Data Sources
curl --request POST \
--url https://api.gurubase.io/api/v1/{guru_slug}/data-sources/ \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"youtube_urls": [
"<string>"
],
"website_urls": [
"<string>"
],
"zendesk_urls": [
"<string>"
],
"jira_urls": [
"<string>"
],
"confluence_urls": [
"<string>"
],
"text_sources": [
{}
]
}
'import requests
url = "https://api.gurubase.io/api/v1/{guru_slug}/data-sources/"
payload = {
"youtube_urls": ["<string>"],
"website_urls": ["<string>"],
"zendesk_urls": ["<string>"],
"jira_urls": ["<string>"],
"confluence_urls": ["<string>"],
"text_sources": [{}]
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
youtube_urls: ['<string>'],
website_urls: ['<string>'],
zendesk_urls: ['<string>'],
jira_urls: ['<string>'],
confluence_urls: ['<string>'],
text_sources: [{}]
})
};
fetch('https://api.gurubase.io/api/v1/{guru_slug}/data-sources/', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.gurubase.io/api/v1/{guru_slug}/data-sources/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'youtube_urls' => [
'<string>'
],
'website_urls' => [
'<string>'
],
'zendesk_urls' => [
'<string>'
],
'jira_urls' => [
'<string>'
],
'confluence_urls' => [
'<string>'
],
'text_sources' => [
[
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.gurubase.io/api/v1/{guru_slug}/data-sources/"
payload := strings.NewReader("{\n \"youtube_urls\": [\n \"<string>\"\n ],\n \"website_urls\": [\n \"<string>\"\n ],\n \"zendesk_urls\": [\n \"<string>\"\n ],\n \"jira_urls\": [\n \"<string>\"\n ],\n \"confluence_urls\": [\n \"<string>\"\n ],\n \"text_sources\": [\n {}\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.gurubase.io/api/v1/{guru_slug}/data-sources/")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"youtube_urls\": [\n \"<string>\"\n ],\n \"website_urls\": [\n \"<string>\"\n ],\n \"zendesk_urls\": [\n \"<string>\"\n ],\n \"jira_urls\": [\n \"<string>\"\n ],\n \"confluence_urls\": [\n \"<string>\"\n ],\n \"text_sources\": [\n {}\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.gurubase.io/api/v1/{guru_slug}/data-sources/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"youtube_urls\": [\n \"<string>\"\n ],\n \"website_urls\": [\n \"<string>\"\n ],\n \"zendesk_urls\": [\n \"<string>\"\n ],\n \"jira_urls\": [\n \"<string>\"\n ],\n \"confluence_urls\": [\n \"<string>\"\n ],\n \"text_sources\": [\n {}\n ]\n}"
response = http.request(request)
puts response.read_body[
{
"type": "YouTube",
"url": "https://youtu.be/gAkwW2tuIqE",
"status": "success",
"id": 3275,
"title": null
},
{
"type": "YouTube",
"url": "https://youtu.be/AhZ3YStdaQs",
"status": "exists",
"id": 3274,
"title": null
},
{
"type": "Website",
"url": "https://kubernetes.io/docs/home/",
"status": "success",
"id": 3276,
"title": null
},
{
"type": "Website",
"url": "https://kubernetes.io/docs/concepts/",
"status": "exists",
"id": 3269,
"title": null
},
{
"type": "Zendesk",
"url": "https://gurubase.zendesk.com/hc/en-us/articles/36075266746139-How-to-troubleshoot-Gurubase-self-hosted",
"status": "success",
"id": 3231,
"title": "How to troubleshoot Gurubase self hosted"
},
{
"type": "Zendesk",
"url": "https://gurubase.zendesk.com/agent/tickets/7",
"status": "exists",
"id": 3232,
"title": "Test Subject"
},
{
"type": "Jira",
"url": "https://domain.atlassian.net/browse/KAN-1",
"status": "success",
"id": 3167,
"title": null
},
{
"type": "Jira",
"url": "https://domain.atlassian.net/browse/KAN-2",
"status": "exists",
"id": 3168,
"title": "Test issue"
},
{
"type": "Confluence",
"url": "https://aral-yektatest.atlassian.net/wiki/spaces/araltestsp/overview",
"status": "success",
"id": 3335,
"title": null
},
{
"type": "Confluence",
"url": "https://aral-yektatest.atlassian.net/wiki/spaces/araltestsp/pages/884737/Gurubase+inner+workings",
"status": "exists",
"id": 3342,
"title": "Gurubase inner workings"
},
{
"type": "Text",
"title": "Text data source",
"content": "This is a text data source",
"status": "success",
"id": 8302
}
]
{
"msg": "Invalid request parameters"
}
{
"msg": "Invalid API key"
}
{
"msg": "Request was throttled. Expected available in 56 seconds."
}
Endpoints
Create Data Sources
Add new data sources to your Guru
POST
/
{guru_slug}
/
data-sources
/
Create Data Sources
curl --request POST \
--url https://api.gurubase.io/api/v1/{guru_slug}/data-sources/ \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"youtube_urls": [
"<string>"
],
"website_urls": [
"<string>"
],
"zendesk_urls": [
"<string>"
],
"jira_urls": [
"<string>"
],
"confluence_urls": [
"<string>"
],
"text_sources": [
{}
]
}
'import requests
url = "https://api.gurubase.io/api/v1/{guru_slug}/data-sources/"
payload = {
"youtube_urls": ["<string>"],
"website_urls": ["<string>"],
"zendesk_urls": ["<string>"],
"jira_urls": ["<string>"],
"confluence_urls": ["<string>"],
"text_sources": [{}]
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
youtube_urls: ['<string>'],
website_urls: ['<string>'],
zendesk_urls: ['<string>'],
jira_urls: ['<string>'],
confluence_urls: ['<string>'],
text_sources: [{}]
})
};
fetch('https://api.gurubase.io/api/v1/{guru_slug}/data-sources/', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.gurubase.io/api/v1/{guru_slug}/data-sources/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'youtube_urls' => [
'<string>'
],
'website_urls' => [
'<string>'
],
'zendesk_urls' => [
'<string>'
],
'jira_urls' => [
'<string>'
],
'confluence_urls' => [
'<string>'
],
'text_sources' => [
[
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.gurubase.io/api/v1/{guru_slug}/data-sources/"
payload := strings.NewReader("{\n \"youtube_urls\": [\n \"<string>\"\n ],\n \"website_urls\": [\n \"<string>\"\n ],\n \"zendesk_urls\": [\n \"<string>\"\n ],\n \"jira_urls\": [\n \"<string>\"\n ],\n \"confluence_urls\": [\n \"<string>\"\n ],\n \"text_sources\": [\n {}\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.gurubase.io/api/v1/{guru_slug}/data-sources/")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"youtube_urls\": [\n \"<string>\"\n ],\n \"website_urls\": [\n \"<string>\"\n ],\n \"zendesk_urls\": [\n \"<string>\"\n ],\n \"jira_urls\": [\n \"<string>\"\n ],\n \"confluence_urls\": [\n \"<string>\"\n ],\n \"text_sources\": [\n {}\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.gurubase.io/api/v1/{guru_slug}/data-sources/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"youtube_urls\": [\n \"<string>\"\n ],\n \"website_urls\": [\n \"<string>\"\n ],\n \"zendesk_urls\": [\n \"<string>\"\n ],\n \"jira_urls\": [\n \"<string>\"\n ],\n \"confluence_urls\": [\n \"<string>\"\n ],\n \"text_sources\": [\n {}\n ]\n}"
response = http.request(request)
puts response.read_body[
{
"type": "YouTube",
"url": "https://youtu.be/gAkwW2tuIqE",
"status": "success",
"id": 3275,
"title": null
},
{
"type": "YouTube",
"url": "https://youtu.be/AhZ3YStdaQs",
"status": "exists",
"id": 3274,
"title": null
},
{
"type": "Website",
"url": "https://kubernetes.io/docs/home/",
"status": "success",
"id": 3276,
"title": null
},
{
"type": "Website",
"url": "https://kubernetes.io/docs/concepts/",
"status": "exists",
"id": 3269,
"title": null
},
{
"type": "Zendesk",
"url": "https://gurubase.zendesk.com/hc/en-us/articles/36075266746139-How-to-troubleshoot-Gurubase-self-hosted",
"status": "success",
"id": 3231,
"title": "How to troubleshoot Gurubase self hosted"
},
{
"type": "Zendesk",
"url": "https://gurubase.zendesk.com/agent/tickets/7",
"status": "exists",
"id": 3232,
"title": "Test Subject"
},
{
"type": "Jira",
"url": "https://domain.atlassian.net/browse/KAN-1",
"status": "success",
"id": 3167,
"title": null
},
{
"type": "Jira",
"url": "https://domain.atlassian.net/browse/KAN-2",
"status": "exists",
"id": 3168,
"title": "Test issue"
},
{
"type": "Confluence",
"url": "https://aral-yektatest.atlassian.net/wiki/spaces/araltestsp/overview",
"status": "success",
"id": 3335,
"title": null
},
{
"type": "Confluence",
"url": "https://aral-yektatest.atlassian.net/wiki/spaces/araltestsp/pages/884737/Gurubase+inner+workings",
"status": "exists",
"id": 3342,
"title": "Gurubase inner workings"
},
{
"type": "Text",
"title": "Text data source",
"content": "This is a text data source",
"status": "success",
"id": 8302
}
]
{
"msg": "Invalid request parameters"
}
{
"msg": "Invalid API key"
}
{
"msg": "Request was throttled. Expected available in 56 seconds."
}
Add new data sources (YouTube videos, websites, Zendesk tickets/articles, etc.) to your Guru. The processing is asynchronous. Check the status of the data sources with the Get Data Sources endpoint.
PDF, Word (.docx), and Excel files should be uploaded directly through the Gurubase platform interface. We will add support for uploading these files via the API in the future.
If you do not have the relevant integration for Jira, Zendesk, and Confluence while adding a new data source, an error is returned.
Path Parameters
string
required
The slug of the Guru to add data sources to
Headers
string
required
Your API key for authentication. You can obtain your API key from the Gurubase dashboard.
Body Parameters
string[]
Array of YouTube video URLs to process
string[]
Array of website URLs to index
string[]
Array of Zendesk ticket/article URLs to index
For Gurubase Self-hosted version, Zendesk integration is currently in beta and available to selected users.
For Gurubase Cloud version, Zendesk integration is available to all users.
string[]
Array of Jira Issue URLs to index
For Gurubase Self-hosted version, Jira integration is currently in beta and available to selected users.
For Gurubase Cloud version, Jira integration is available to all users.
string[]
Array of Confluence Page URLs to index
For Gurubase Self-hosted version, Confluence integration is currently in beta and available to selected users.
For Gurubase Cloud version, Confluence integration is available to all users.
object[]
Array of text sources to index.
Each object should contain:
name(string): Name of the sourcecontent(string): Text content to index
If you send a text data source that has the same name as an existing one, it will be updated with the new content.
Response
The response is an array of processed data sources.string
Type of data source (Website, YouTube, Jira, Zendesk, Confluence, etc.)
string
URL of the data source
This field is not present for data sources of
Text type.string
Processing status (e.g., “exists”, “success”)
number
Unique identifier for the data source
string
Title of the data source (can be null)
string
Content of the data source
This field is only present for data sources of
Text type.[
{
"type": "YouTube",
"url": "https://youtu.be/gAkwW2tuIqE",
"status": "success",
"id": 3275,
"title": null
},
{
"type": "YouTube",
"url": "https://youtu.be/AhZ3YStdaQs",
"status": "exists",
"id": 3274,
"title": null
},
{
"type": "Website",
"url": "https://kubernetes.io/docs/home/",
"status": "success",
"id": 3276,
"title": null
},
{
"type": "Website",
"url": "https://kubernetes.io/docs/concepts/",
"status": "exists",
"id": 3269,
"title": null
},
{
"type": "Zendesk",
"url": "https://gurubase.zendesk.com/hc/en-us/articles/36075266746139-How-to-troubleshoot-Gurubase-self-hosted",
"status": "success",
"id": 3231,
"title": "How to troubleshoot Gurubase self hosted"
},
{
"type": "Zendesk",
"url": "https://gurubase.zendesk.com/agent/tickets/7",
"status": "exists",
"id": 3232,
"title": "Test Subject"
},
{
"type": "Jira",
"url": "https://domain.atlassian.net/browse/KAN-1",
"status": "success",
"id": 3167,
"title": null
},
{
"type": "Jira",
"url": "https://domain.atlassian.net/browse/KAN-2",
"status": "exists",
"id": 3168,
"title": "Test issue"
},
{
"type": "Confluence",
"url": "https://aral-yektatest.atlassian.net/wiki/spaces/araltestsp/overview",
"status": "success",
"id": 3335,
"title": null
},
{
"type": "Confluence",
"url": "https://aral-yektatest.atlassian.net/wiki/spaces/araltestsp/pages/884737/Gurubase+inner+workings",
"status": "exists",
"id": 3342,
"title": "Gurubase inner workings"
},
{
"type": "Text",
"title": "Text data source",
"content": "This is a text data source",
"status": "success",
"id": 8302
}
]
{
"msg": "Invalid request parameters"
}
{
"msg": "Invalid API key"
}
{
"msg": "Request was throttled. Expected available in 56 seconds."
}
Was this page helpful?
⌘I