Skip to main content
POST
List the requests in cluster log lines

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Headers

x-ankra-organisation-id
string

PAT organisation override.

Path Parameters

cluster_id
string<uuid>
required

Body

application/json
start
string
end
string
since
string
namespaces
string[]
pods
string[]
containers
string[]
raw_query
string

Applied as on the history query: the requests are read among the lines it returns.

source
enum<string>
default:auto

The same source choice as the history query, so the requests and the lines come from one store.

Available options:
auto,
connected,
ankra_hosted
levels
enum<string>[]

Keep only the lines of these level classes, each line in the class the volume counts it under (a severity field, or a level stated in the line's JSON or logfmt text; a line without a recognised severity is other). Empty or absent keeps every class. Refused with 400 for a class not listed here, beside raw_query, or when Loki is the store and the classes are not next to each other in the order error, warn, info, debug, other: Loki's line filters cannot say or.

Maximum array length: 100
Available options:
error,
warn,
info,
debug,
other
exclude
object

Lines to leave out. Refused with 400 for a key other than pods, levels and words, and beside raw_query.

limit
integer
default:25

The most requests to list, newest first. Refused with 400 outside 1 to 50.

Required range: 1 <= x <= 50
cursor
string | null

An earlier answer's older_cursor, sent with the same window and filters: lists the requests older than that answer's, read on from the last line it grouped. A cursor that is not in an answer's form, or is outside the window, is refused with 400.

Response

Requests among the newest matching lines

provider
string
source
string

ankra_hosted when Ankra hosted logs answered; absent for a connected source.

note
string
cluster_attribution
object
start
string
end
string
kept_days
integer | null

The most days the store keeps a line: 7 for Ankra hosted logs, and null for a store of your own.

state
enum<string>

grouped when requests were found. Otherwise why none was: no_lines when the window holds no matching line, no_request_id when no line read names a request id under any of id_keys, no_request_lines when lines name ids but none of them says the path or route and the method or status of its request.

Available options:
grouped,
no_lines,
no_request_id,
no_request_lines
requests
object[]

Every request among the lines read, newest first, one per id, at most limit: the read stops at the request line of the request past it. Two lines are lines of one request when they name one value under one key, two spellings of a key (request_id, requestId) being one key. Empty unless state is grouped.

requests_found
integer

How many requests are listed: every request among the lines read.

limit
integer
read_lines
integer

How many of the newest matching lines were read and grouped.

read_limit
integer

The most lines one answer reads: 2000.

capped
boolean

True when the window holds more matching lines than were read: older than read_from, read on with older_cursor. Every number is then within the lines read from read_from to read_to.

read_from
string

The oldest moment the lines read cover: the window's start, or the oldest line read when capped.

read_to
string

The window's end, or the cursor's moment when the read went on from one.

id_field
string | null

The key most of the lines read name their request under; null when none does.

id_keys
string[]

The keys a request id is read from, in the order they are tried, at the top level of a line and one level down.

lines_with_id
integer

The lines read that name a request id.

lines_without_id
integer

The lines read that name none.

total_hits
integer

The store's count of matching lines in the window, from the first page read.

total_hits_relation
enum<string>
Available options:
eq,
gte
older_cursor
string | null

Send back as cursor, with the same window and filters, to list the requests older than these. Null when the window holds no older matching line, or when the last line read carries no time a cursor can name.