Get document chunks
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://blackbox.dasha.ai/api/v1/rag/document/{id}/chunks', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request GET \
--url https://blackbox.dasha.ai/api/v1/rag/document/{id}/chunks \
--header 'Authorization: Bearer <token>'import requests
url = "https://blackbox.dasha.ai/api/v1/rag/document/{id}/chunks"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"items": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"documentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"title": "<string>",
"contentPreview": "<string>",
"contentLength": 123,
"startLine": 123,
"endLine": 123,
"createdAt": "2023-11-07T05:31:56Z"
}
],
"totalItems": 123
}Get document chunks
GET
/
api
/
v1
/
rag
/
document
/
{id}
/
chunks
Get document chunks
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://blackbox.dasha.ai/api/v1/rag/document/{id}/chunks', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request GET \
--url https://blackbox.dasha.ai/api/v1/rag/document/{id}/chunks \
--header 'Authorization: Bearer <token>'import requests
url = "https://blackbox.dasha.ai/api/v1/rag/document/{id}/chunks"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"items": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"documentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"title": "<string>",
"contentPreview": "<string>",
"contentLength": 123,
"startLine": 123,
"endLine": 123,
"createdAt": "2023-11-07T05:31:56Z"
}
],
"totalItems": 123
}Path Parameters
Document ID
Query Parameters
Optional, skip N records. Default 0
Required range:
0 <= x <= 2147483647Optional, take M records. Default 20
Required range:
1 <= x <= 1000Was this page helpful?