curl --request POST \
--url https://app.codealive.ai/api/tools/get_data_sources \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"query": "agent framework"
}
'import requests
url = "https://app.codealive.ai/api/tools/get_data_sources"
payload = { "query": "agent framework" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({query: 'agent framework'})
};
fetch('https://app.codealive.ai/api/tools/get_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://app.codealive.ai/api/tools/get_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([
'query' => 'agent framework'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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://app.codealive.ai/api/tools/get_data_sources"
payload := strings.NewReader("{\n \"query\": \"agent framework\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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://app.codealive.ai/api/tools/get_data_sources")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"query\": \"agent framework\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.codealive.ai/api/tools/get_data_sources")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"query\": \"agent framework\"\n}"
response = http.request(request)
puts response.read_body{
"obj": {
"data_sources": [
{
"type": "Repository",
"id": "665f1c2ab3e77d0c9a1b4d21",
"name": "agent-framework",
"fullName": "CodeAlive-AI/agent-framework",
"description": "Multi-agent orchestration framework.",
"readiness": "Ready"
}
],
"relevance_status": "succeeded",
"total_available": 3,
"billed": true,
"hint": "Use the name value returned here for data_sources/data_source. Use id for automation or explicit disambiguation."
},
"rendered": "<data_sources relevance_status=\"succeeded\">\n <data_source type=\"Repository\" id=\"665f1c2ab3e77d0c9a1b4d21\" name=\"agent-framework\" fullName=\"CodeAlive-AI/agent-framework\" readiness=\"Ready\" />\n</data_sources>\nUse the name attribute for data_sources/data_source unless automation needs id."
}List visible data sources
Lists the repositories and workspaces visible to the calling API key, including readiness state. Call this first: every other tool accepts the returned name values in its data_sources/data_source argument (use id only for automation or to disambiguate duplicate names). Pass an optional query to rank sources by relevance to a question; the call is billed only when relevance ranking actually runs.
curl --request POST \
--url https://app.codealive.ai/api/tools/get_data_sources \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"query": "agent framework"
}
'import requests
url = "https://app.codealive.ai/api/tools/get_data_sources"
payload = { "query": "agent framework" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({query: 'agent framework'})
};
fetch('https://app.codealive.ai/api/tools/get_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://app.codealive.ai/api/tools/get_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([
'query' => 'agent framework'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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://app.codealive.ai/api/tools/get_data_sources"
payload := strings.NewReader("{\n \"query\": \"agent framework\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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://app.codealive.ai/api/tools/get_data_sources")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"query\": \"agent framework\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.codealive.ai/api/tools/get_data_sources")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"query\": \"agent framework\"\n}"
response = http.request(request)
puts response.read_body{
"obj": {
"data_sources": [
{
"type": "Repository",
"id": "665f1c2ab3e77d0c9a1b4d21",
"name": "agent-framework",
"fullName": "CodeAlive-AI/agent-framework",
"description": "Multi-agent orchestration framework.",
"readiness": "Ready"
}
],
"relevance_status": "succeeded",
"total_available": 3,
"billed": true,
"hint": "Use the name value returned here for data_sources/data_source. Use id for automation or explicit disambiguation."
},
"rendered": "<data_sources relevance_status=\"succeeded\">\n <data_source type=\"Repository\" id=\"665f1c2ab3e77d0c9a1b4d21\" name=\"agent-framework\" fullName=\"CodeAlive-AI/agent-framework\" readiness=\"Ready\" />\n</data_sources>\nUse the name attribute for data_sources/data_source unless automation needs id."
}Authorizations
Body
Response
Success envelope. obj contains data_sources (visible sources with id, name, fullName, readiness), relevance_status (not_requested | skipped | failed_open | succeeded), total_available, billed, and a usage hint; rendered is a compact <data_sources> XML block for agents. Repairable failures (missing or invalid arguments, ambiguous or unknown data sources) also return HTTP 200 with obj.error = { code, message, retry, try } and a rendered <tool_error> block; repair the arguments and retry.
Was this page helpful?