Search knowledge documents
Searches only the explicitly named ready documents under knowledge:read; text stays in the request body and never enters a URL. It stores no query or result state and is safe to retry subject to rate limits.
POST
/
knowledge
/
search
Search knowledge documents
curl --request POST \
--url https://api.getarbol.com/v1/knowledge/search \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"documentIds": [
"agt_018f47a2-4f4d-7d61-9e2c-1d7b8e9a0c31"
],
"query": "<string>"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({documentIds: ['agt_018f47a2-4f4d-7d61-9e2c-1d7b8e9a0c31'], query: '<string>'})
};
fetch('https://api.getarbol.com/v1/knowledge/search', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.getarbol.com/v1/knowledge/search"
payload = {
"documentIds": ["agt_018f47a2-4f4d-7d61-9e2c-1d7b8e9a0c31"],
"query": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"items": [
{
"documentId": "agt_018f47a2-4f4d-7d61-9e2c-1d7b8e9a0c31",
"score": 123,
"text": "<string>"
}
]
}{
"defined": true,
"inferable": true,
"code": "BAD_REQUEST",
"status": 400,
"message": "<string>",
"data": {
"issues": [
{
"code": "custom",
"message": "<string>",
"path": [
"<string>"
]
}
],
"truncated": true
}
}{
"defined": true,
"inferable": true,
"code": "UNAUTHORIZED",
"status": 401,
"message": "<string>",
"data": "<unknown>"
}{
"defined": true,
"inferable": true,
"code": "FORBIDDEN",
"status": 403,
"message": "<string>",
"data": {
"missingPermissions": [
"agents:read"
]
}
}{
"defined": true,
"inferable": true,
"code": "NOT_FOUND",
"status": 404,
"message": "<string>",
"data": "<unknown>"
}{
"code": "PAYLOAD_TOO_LARGE",
"defined": false,
"inferable": false,
"message": "<string>",
"data": "<unknown>"
}{
"code": "UNSUPPORTED_MEDIA_TYPE",
"defined": false,
"inferable": false,
"message": "<string>",
"data": "<unknown>"
}{
"defined": true,
"inferable": true,
"code": "TOO_MANY_REQUESTS",
"status": 429,
"message": "<string>",
"data": {
"retryAfterSeconds": 123
}
}{
"defined": true,
"inferable": true,
"code": "SERVICE_UNAVAILABLE",
"status": 503,
"message": "<string>",
"data": "<unknown>"
}Authorizations
userOAuthmachineOAuth
Organization-scoped Auth0 user access token issued to an approved first-party client or exchanged by a trusted OBO resource server.
Body
application/json
Bounded semantic query over an explicit set of tenant-authorized Knowledge documents.
Required array length:
1 - 100 elementsOpaque Arbol resource identifier; the endpoint and tenant-scoped lookup determine its resource type.
Maximum string length:
64Pattern:
^[a-z][a-z0-9]{1,15}_[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$Required string length:
2 - 500Required range:
1 <= x <= 20Response
OK
Maximum array length:
20Show child attributes
Show child attributes
⌘I
Search knowledge documents
curl --request POST \
--url https://api.getarbol.com/v1/knowledge/search \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"documentIds": [
"agt_018f47a2-4f4d-7d61-9e2c-1d7b8e9a0c31"
],
"query": "<string>"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({documentIds: ['agt_018f47a2-4f4d-7d61-9e2c-1d7b8e9a0c31'], query: '<string>'})
};
fetch('https://api.getarbol.com/v1/knowledge/search', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.getarbol.com/v1/knowledge/search"
payload = {
"documentIds": ["agt_018f47a2-4f4d-7d61-9e2c-1d7b8e9a0c31"],
"query": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"items": [
{
"documentId": "agt_018f47a2-4f4d-7d61-9e2c-1d7b8e9a0c31",
"score": 123,
"text": "<string>"
}
]
}{
"defined": true,
"inferable": true,
"code": "BAD_REQUEST",
"status": 400,
"message": "<string>",
"data": {
"issues": [
{
"code": "custom",
"message": "<string>",
"path": [
"<string>"
]
}
],
"truncated": true
}
}{
"defined": true,
"inferable": true,
"code": "UNAUTHORIZED",
"status": 401,
"message": "<string>",
"data": "<unknown>"
}{
"defined": true,
"inferable": true,
"code": "FORBIDDEN",
"status": 403,
"message": "<string>",
"data": {
"missingPermissions": [
"agents:read"
]
}
}{
"defined": true,
"inferable": true,
"code": "NOT_FOUND",
"status": 404,
"message": "<string>",
"data": "<unknown>"
}{
"code": "PAYLOAD_TOO_LARGE",
"defined": false,
"inferable": false,
"message": "<string>",
"data": "<unknown>"
}{
"code": "UNSUPPORTED_MEDIA_TYPE",
"defined": false,
"inferable": false,
"message": "<string>",
"data": "<unknown>"
}{
"defined": true,
"inferable": true,
"code": "TOO_MANY_REQUESTS",
"status": 429,
"message": "<string>",
"data": {
"retryAfterSeconds": 123
}
}{
"defined": true,
"inferable": true,
"code": "SERVICE_UNAVAILABLE",
"status": 503,
"message": "<string>",
"data": "<unknown>"
}