Skip to main content
POST
Search cluster log history in the selected store

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
raw_query
string
direction
string
namespaces
string[]
pods
string[]
containers
string[]
source
enum<string>
default:auto

Read auto (connected source first, hosted only when no source is connected), connected only, or Ankra hosted logs only. An explicit choice never switches on empty results or failure and does not alter the saved connection.

Available options:
auto,
connected,
ankra_hosted
limit
integer
include_record
boolean
default:false

Also return each entry's record: the application's own structured line as stored, without the log shipper's envelope (Kubernetes metadata, stream, cluster and tenant fields). Elasticsearch/OpenSearch and VictoriaLogs only; long values are cut.

cursor
string

A previous answer's next_cursor: read the next page of the same window, filters and direction. Lines that share a timestamp are neither repeated nor skipped across pages.

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.

Response

Scoped log search results

provider
string
source
string

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

note
string
entries
object[]
total_hits
integer
total_hits_relation
enum<string>
Available options:
eq,
gte
truncated
boolean
start
string
end
string
cluster_attribution
object
next_cursor
string | null

Send as cursor to read the next page; null when the window holds no more lines past this page, or when the page's last line carries no readable time (truncated and total_hits_relation then say whether more exist).

kept_days
integer | null

The most days the store keeps a line: 7 for Ankra hosted logs, whose disk limit can delete lines sooner, and null for a store of your own, whose retention Ankra cannot know.