Get Chunk and Artifact Information by Chunk ID
curl --request GET \
--url https://api.egp.scale.com/v4/knowledge-bases/chunks/{chunk_id} \
--header 'x-api-key: <api-key>'import requests
url = "https://api.egp.scale.com/v4/knowledge-bases/chunks/{chunk_id}"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://api.egp.scale.com/v4/knowledge-bases/chunks/{chunk_id}', 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.egp.scale.com/v4/knowledge-bases/chunks/{chunk_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"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"
"net/http"
"io"
)
func main() {
url := "https://api.egp.scale.com/v4/knowledge-bases/chunks/{chunk_id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.egp.scale.com/v4/knowledge-bases/chunks/{chunk_id}")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.egp.scale.com/v4/knowledge-bases/chunks/{chunk_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"id": "<string>",
"text": "<string>",
"artifact_id": "<string>",
"chunk_position": 123,
"status": "Pending",
"artifact": {
"knowledge_base_id": "<string>",
"artifact_name": "<string>",
"artifact_uri": "<string>",
"source": "S3",
"status": "Pending",
"created_at": "<string>",
"updated_at": "<string>",
"artifact_id": "<string>",
"chunking_strategy_config": {
"strategy": "character",
"separator": "\n\n",
"chunk_size": 1000,
"chunk_overlap": 200
},
"artifact_uri_public": "<string>",
"content_modification_identifier": "<string>",
"status_reason": "<string>",
"checkpoint": "Pending",
"deleted_at": "<string>",
"tags": {}
},
"metadata": {},
"user_supplied_metadata": {},
"status_reason": "<string>",
"created_at": "2023-11-07T05:31:56Z"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Knowledge Bases
Get Chunk and Artifact Information by Chunk ID
Looks up a chunk by its id alone — no knowledge base or artifact id in the path — and returns the chunk together with the full metadata of the artifact it belongs to. Use this when you have only a chunk id (for example from a query/search result) and need both the chunk and which artifact it came from, rather than the artifact-scoped chunk endpoints. Because the path carries no knowledge base id, the parent knowledge base is resolved from the chunk and the authorization check is performed inside the request against that resolved knowledge base.
GET
/
v4
/
knowledge-bases
/
chunks
/
{chunk_id}
Get Chunk and Artifact Information by Chunk ID
curl --request GET \
--url https://api.egp.scale.com/v4/knowledge-bases/chunks/{chunk_id} \
--header 'x-api-key: <api-key>'import requests
url = "https://api.egp.scale.com/v4/knowledge-bases/chunks/{chunk_id}"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://api.egp.scale.com/v4/knowledge-bases/chunks/{chunk_id}', 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.egp.scale.com/v4/knowledge-bases/chunks/{chunk_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"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"
"net/http"
"io"
)
func main() {
url := "https://api.egp.scale.com/v4/knowledge-bases/chunks/{chunk_id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.egp.scale.com/v4/knowledge-bases/chunks/{chunk_id}")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.egp.scale.com/v4/knowledge-bases/chunks/{chunk_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"id": "<string>",
"text": "<string>",
"artifact_id": "<string>",
"chunk_position": 123,
"status": "Pending",
"artifact": {
"knowledge_base_id": "<string>",
"artifact_name": "<string>",
"artifact_uri": "<string>",
"source": "S3",
"status": "Pending",
"created_at": "<string>",
"updated_at": "<string>",
"artifact_id": "<string>",
"chunking_strategy_config": {
"strategy": "character",
"separator": "\n\n",
"chunk_size": 1000,
"chunk_overlap": 200
},
"artifact_uri_public": "<string>",
"content_modification_identifier": "<string>",
"status_reason": "<string>",
"checkpoint": "Pending",
"deleted_at": "<string>",
"tags": {}
},
"metadata": {},
"user_supplied_metadata": {},
"status_reason": "<string>",
"created_at": "2023-11-07T05:31:56Z"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Response
Successful Response

