import requests
url = "https://api.platform.ankra.app/org/clusters/imported/{cluster_id}/logs/sentence"
payload = { "sentence": "<string>" }
headers = {
"cookie": "ankra_session=",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {cookie: 'ankra_session=', 'Content-Type': 'application/json'},
body: JSON.stringify({sentence: '<string>'})
};
fetch('https://api.platform.ankra.app/org/clusters/imported/{cluster_id}/logs/sentence', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request POST \
--url https://api.platform.ankra.app/org/clusters/imported/{cluster_id}/logs/sentence \
--header 'Content-Type: application/json' \
--cookie ankra_session= \
--data '
{
"sentence": "<string>"
}
'{
"state": "read",
"sentence": "<string>",
"read_as": "<string>",
"query": {
"search": "<string>",
"levels": [
"error"
],
"pods": [
"<string>"
],
"exclude": {
"pods": [
"<string>"
],
"levels": [
"error"
],
"words": [
"<string>"
]
},
"start": "2023-11-07T05:31:56Z",
"end": "2023-11-07T05:31:56Z",
"namespaces": [
"<string>"
],
"source": "<string>"
},
"filters": [
{
"field": "level",
"value": "<string>",
"not": true
}
],
"words": "<string>",
"excluded_words": [
"<string>"
],
"time": {
"start": "2023-11-07T05:31:56Z",
"end": "2023-11-07T05:31:56Z",
"label": "<string>"
},
"set_aside": [
"<string>"
],
"reason": "ai_paused",
"detail": "<string>"
}Read a sentence into a log search
Session-authenticated. Reads a sentence typed on an application’s Logs page into the search it asks for, in the shape the history query takes: search words, level classes and copies to keep or leave out, words to leave out, and a time window, with a short line saying how it was read. It never runs the search. Each press spends the organisation’s AI allowance on its log search lane, behind the AI kill switch, the monthly allowance and the daily spend cap; a press those refuse, or a reading that fails, answers state not_read with a reason and a sentence, never an empty search. The model’s answer is checked against the fields the store holds over the last 7 days, the level classes and the window the store keeps, and anything else is left out and said in set_aside. Requires kubernetes.logs on this cluster.
import requests
url = "https://api.platform.ankra.app/org/clusters/imported/{cluster_id}/logs/sentence"
payload = { "sentence": "<string>" }
headers = {
"cookie": "ankra_session=",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {cookie: 'ankra_session=', 'Content-Type': 'application/json'},
body: JSON.stringify({sentence: '<string>'})
};
fetch('https://api.platform.ankra.app/org/clusters/imported/{cluster_id}/logs/sentence', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request POST \
--url https://api.platform.ankra.app/org/clusters/imported/{cluster_id}/logs/sentence \
--header 'Content-Type: application/json' \
--cookie ankra_session= \
--data '
{
"sentence": "<string>"
}
'{
"state": "read",
"sentence": "<string>",
"read_as": "<string>",
"query": {
"search": "<string>",
"levels": [
"error"
],
"pods": [
"<string>"
],
"exclude": {
"pods": [
"<string>"
],
"levels": [
"error"
],
"words": [
"<string>"
]
},
"start": "2023-11-07T05:31:56Z",
"end": "2023-11-07T05:31:56Z",
"namespaces": [
"<string>"
],
"source": "<string>"
},
"filters": [
{
"field": "level",
"value": "<string>",
"not": true
}
],
"words": "<string>",
"excluded_words": [
"<string>"
],
"time": {
"start": "2023-11-07T05:31:56Z",
"end": "2023-11-07T05:31:56Z",
"label": "<string>"
},
"set_aside": [
"<string>"
],
"reason": "ai_paused",
"detail": "<string>"
}Authorizations
Body
Response
The search read from the sentence, or the reason it was not read
One press's answer. state read carries the search (read_as, query, filters, words, excluded_words, time, set_aside, every one present); state not_read carries reason and detail and no search at all.
How the sentence was read, in the page's own words, for "Ankra read that as: ...": the filters as their chips are written, the words and the time, joined by " · ", such as "Level: Error · the words “checkout” · Sat 28 Nov, 18:00 to 22:00". A sentence nothing was found in reads "the words “...”, searched for as they are".