curl --request POST \
--url https://app.codealive.ai/api/tools/fetch_artifacts \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"identifiers": [
"<string>"
],
"data_source": "<string>"
}
'import requests
url = "https://app.codealive.ai/api/tools/fetch_artifacts"
payload = {
"identifiers": ["<string>"],
"data_source": "<string>"
}
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({identifiers: ['<string>'], data_source: '<string>'})
};
fetch('https://app.codealive.ai/api/tools/fetch_artifacts', 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/fetch_artifacts",
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([
'identifiers' => [
'<string>'
],
'data_source' => '<string>'
]),
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/fetch_artifacts"
payload := strings.NewReader("{\n \"identifiers\": [\n \"<string>\"\n ],\n \"data_source\": \"<string>\"\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/fetch_artifacts")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"identifiers\": [\n \"<string>\"\n ],\n \"data_source\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.codealive.ai/api/tools/fetch_artifacts")
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 \"identifiers\": [\n \"<string>\"\n ],\n \"data_source\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"obj": {
"artifacts": [
{
"identifier": "<string>",
"found": true,
"content": "<string>",
"contentByteSize": 123,
"startLine": 123,
"relationships": {
"outgoingCallsCount": 123,
"outgoingCalls": [
{
"identifier": "<string>",
"summary": "<string>"
}
],
"incomingCallsCount": 123,
"incomingCalls": [
{
"identifier": "<string>",
"summary": "<string>"
}
]
}
}
],
"hint": "<string>",
"warnings": [
{
"code": "<string>",
"message": "<string>",
"alias": "<string>",
"canonical": "<string>"
}
]
},
"rendered": "<string>"
}Fetch artifacts
Fetches full content for up to 50 known artifact identifiers (repository::path or repository::path::symbol) returned by semantic_search, grep_search, read_file, or get_artifact_relationships. This is the preferred way to read code once an identifier is known — do not split the identifier back into a repository and path for read_file. Responses include relationship previews (caller/callee counts) that suggest the next traversal step.
curl --request POST \
--url https://app.codealive.ai/api/tools/fetch_artifacts \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"identifiers": [
"<string>"
],
"data_source": "<string>"
}
'import requests
url = "https://app.codealive.ai/api/tools/fetch_artifacts"
payload = {
"identifiers": ["<string>"],
"data_source": "<string>"
}
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({identifiers: ['<string>'], data_source: '<string>'})
};
fetch('https://app.codealive.ai/api/tools/fetch_artifacts', 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/fetch_artifacts",
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([
'identifiers' => [
'<string>'
],
'data_source' => '<string>'
]),
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/fetch_artifacts"
payload := strings.NewReader("{\n \"identifiers\": [\n \"<string>\"\n ],\n \"data_source\": \"<string>\"\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/fetch_artifacts")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"identifiers\": [\n \"<string>\"\n ],\n \"data_source\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.codealive.ai/api/tools/fetch_artifacts")
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 \"identifiers\": [\n \"<string>\"\n ],\n \"data_source\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"obj": {
"artifacts": [
{
"identifier": "<string>",
"found": true,
"content": "<string>",
"contentByteSize": 123,
"startLine": 123,
"relationships": {
"outgoingCallsCount": 123,
"outgoingCalls": [
{
"identifier": "<string>",
"summary": "<string>"
}
],
"incomingCallsCount": 123,
"incomingCalls": [
{
"identifier": "<string>",
"summary": "<string>"
}
]
}
}
],
"hint": "<string>",
"warnings": [
{
"code": "<string>",
"message": "<string>",
"alias": "<string>",
"canonical": "<string>"
}
]
},
"rendered": "<string>"
}Authorizations
API Key authentication using Bearer token. Example: "Authorization: Bearer {apiKey}"
Body
Up to 50 artifact identifiers returned by semantic_search, grep_search, read_file, or get_artifact_relationships.
50Optional success projection. Omit to return both obj and rendered; use json for obj only; use agentic for rendered text only. Repairable errors always return both obj.error and rendered.
json, agentic Optional repository or workspace name/id used to disambiguate identifiers.
Response
Success envelope. obj.artifacts[] returns each requested identifier with found, content, contentByteSize, startLine, and a relationships preview (caller/callee counts); rendered is the JSON-serialized form of obj. 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?