Skip to main content
POST
Count cluster log lines by field

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
fields
string[]
required

The fields to count, each once: level, pod, or record. for a key of the application's record (letters, digits, '_', '-', '@' and dots between words, at most 128 characters). version is refused: count by pod and add up the pods of each version.

Required array length: 1 - 8 elements
start
string
end
string
since
string
raw_query
string

Refused with 400 whenever it names a value: the store cannot count a raw query by field with the count's rule. Use the structured filters.

namespaces
string[]
pods
string[]
containers
string[]
levels
enum<string>[]

Count only the lines of these level classes, as the log volume count reads them. Refused with 400 as on the count.

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

Lines to leave out of every field's count, as the log volume count leaves them out. Refused with 400 for a key other than pods, levels and words.

source
enum<string>
default:auto

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

Available options:
auto,
connected,
ankra_hosted
level
any

Refused with 400 whenever it names a value: use levels, the level classes the count reads.

min_level
any

Refused with 400 whenever it names a value: use levels, the level classes the count reads.

cursor
any

Refused with 400 whenever it names a value: the counts cover the whole window.

step_seconds
any

Refused with 400 whenever it names a value: the counts cover the whole window.

Response

The matching lines counted by each field

provider
string
source
string

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

note
string
cluster_attribution
object
start
string

The window's start, taken down to the whole second as on the log volume count.

end
string

The window's end, taken up to the whole second as on the log volume count.

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.

value_limit
integer

The most values one field lists: 100.

fields
object[]

Every field asked for, in the order asked.