Read the log lines of one request
import requests
url = "https://platform.ankra.app/api/v1/org/clusters/imported/{cluster_id}/logs/request-lines"
payload = { "request_id": "<string>" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({request_id: '<string>'})
};
fetch('https://platform.ankra.app/api/v1/org/clusters/imported/{cluster_id}/logs/request-lines', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request POST \
--url https://platform.ankra.app/api/v1/org/clusters/imported/{cluster_id}/logs/request-lines \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"request_id": "<string>"
}
'{
"provider": "<string>",
"source": "<string>",
"note": "<string>",
"cluster_attribution": {},
"start": "<string>",
"end": "<string>",
"kept_days": 123,
"state": "found",
"matched_by": "text",
"request_id": "<string>",
"id_field": "<string>",
"count": 123,
"count_exact": true,
"lines": [
{
"timestamp": "<string>",
"line": "<string>",
"labels": {},
"record": {}
}
],
"lines_shown_limit": 123,
"searched_lines": 123,
"other_lines": 123
}Clusters
Read the log lines of one request
The lines of one request: a search for its id in the window (at most 24 hours), kept where the line names the id as its request, oldest first. count says how many there are, exact only when the search read every line holding the id and each holds it in its text, and a floor otherwise; a search that found none answers not_countable, never 0.
This is the API-token route. It requires kubernetes.logs on the cluster, and a token’s scopes narrow it.
POST
/
api
/
v1
/
org
/
clusters
/
imported
/
{cluster_id}
/
logs
/
request-lines
Read the log lines of one request
import requests
url = "https://platform.ankra.app/api/v1/org/clusters/imported/{cluster_id}/logs/request-lines"
payload = { "request_id": "<string>" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({request_id: '<string>'})
};
fetch('https://platform.ankra.app/api/v1/org/clusters/imported/{cluster_id}/logs/request-lines', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request POST \
--url https://platform.ankra.app/api/v1/org/clusters/imported/{cluster_id}/logs/request-lines \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"request_id": "<string>"
}
'{
"provider": "<string>",
"source": "<string>",
"note": "<string>",
"cluster_attribution": {},
"start": "<string>",
"end": "<string>",
"kept_days": 123,
"state": "found",
"matched_by": "text",
"request_id": "<string>",
"id_field": "<string>",
"count": 123,
"count_exact": true,
"lines": [
{
"timestamp": "<string>",
"line": "<string>",
"labels": {},
"record": {}
}
],
"lines_shown_limit": 123,
"searched_lines": 123,
"other_lines": 123
}Authorizations
Body
application/json
Response
The request's lines