Search a knowledge base
curl --request POST \
--url https://app.rookoo.ai/api/v1/accounts/{account_id}/knowledgebases/{id}/search \
--header 'Content-Type: application/json' \
--header 'api_access_token: <api-key>' \
--data '
{
"query": "<string>",
"search_type": "<string>",
"max_results": 123,
"offset": 123,
"template": "<string>",
"locale": "<string>",
"must": [
{}
],
"should": [
{}
],
"must_not": [
{}
]
}
'const options = {
method: 'POST',
headers: {api_access_token: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
query: '<string>',
search_type: '<string>',
max_results: 123,
offset: 123,
template: '<string>',
locale: '<string>',
must: [{}],
should: [{}],
must_not: [{}]
})
};
fetch('https://app.rookoo.ai/api/v1/accounts/{account_id}/knowledgebases/{id}/search', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://app.rookoo.ai/api/v1/accounts/{account_id}/knowledgebases/{id}/search"
payload = {
"query": "<string>",
"search_type": "<string>",
"max_results": 123,
"offset": 123,
"template": "<string>",
"locale": "<string>",
"must": [{}],
"should": [{}],
"must_not": [{}]
}
headers = {
"api_access_token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){}Knowledge Bases
Search a knowledge base
Vector or hybrid search over knowledge base documents.
POST
/
api
/
v1
/
accounts
/
{account_id}
/
knowledgebases
/
{id}
/
search
Search a knowledge base
curl --request POST \
--url https://app.rookoo.ai/api/v1/accounts/{account_id}/knowledgebases/{id}/search \
--header 'Content-Type: application/json' \
--header 'api_access_token: <api-key>' \
--data '
{
"query": "<string>",
"search_type": "<string>",
"max_results": 123,
"offset": 123,
"template": "<string>",
"locale": "<string>",
"must": [
{}
],
"should": [
{}
],
"must_not": [
{}
]
}
'const options = {
method: 'POST',
headers: {api_access_token: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
query: '<string>',
search_type: '<string>',
max_results: 123,
offset: 123,
template: '<string>',
locale: '<string>',
must: [{}],
should: [{}],
must_not: [{}]
})
};
fetch('https://app.rookoo.ai/api/v1/accounts/{account_id}/knowledgebases/{id}/search', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://app.rookoo.ai/api/v1/accounts/{account_id}/knowledgebases/{id}/search"
payload = {
"query": "<string>",
"search_type": "<string>",
"max_results": 123,
"offset": 123,
"template": "<string>",
"locale": "<string>",
"must": [{}],
"should": [{}],
"must_not": [{}]
}
headers = {
"api_access_token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){}Authorizations
userApiKeyagentBotApiKey
This token can be obtained by visiting the profile page or via rails console. Provides access to endpoints based on the user permissions levels. This token can be saved by an external system when user is created via API, to perform activities on behalf of the user.
Body
application/json
Response
200 - application/json
Success
The response is of type object.