Skip to main content
POST
Query a canvas dataset

Authorizations

Authorization
string
header
required

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

Headers

authorization
string | null
x-ankra-organisation-id
string | null

Path Parameters

dataset_id
string
required

Body

application/json
time_range
object
required
params
object
step_seconds
integer
Required range: x >= 1
compare_previous
boolean
default:false

Response

The query ran. Its state says whether data came back: ok, empty, stale, unavailable (the source could not be read or did not answer within 10 seconds; reason says why) or denied (the cluster named in params is not visible to the caller).

state
enum<string>
required
Available options:
ok,
empty,
stale,
unavailable,
denied
observed_at
string | null
required

RFC 3339 time of the newest observation the source holds for the answer; null when nothing was observed.

source
string
required
query_description
string
required
reason
string

Why the state is not ok, when the source said.

reason_code
enum<string>

Set beside reason by the application.source_metric and cluster.promql datasets only; other datasets leave it out.

Available options:
no_source,
sandbox_cluster,
source_kind_unreadable,
credential_unreadable,
cluster_offline,
no_agent,
source_timeout,
read_budget_spent,
source_refused,
source_answer_unreadable,
not_wired,
platform_failed,
denied,
not_deployed,
several_places,
namespace_unusable,
range_not_started,
nothing_found,
no_number,
nothing_observed,
not_a_histogram,
over_cap,
list_may_be_incomplete,
names_unusable,
answer_too_large,
above_highest_bound,
missing_samples,
placements_unreadable,
request_cancelled,
source_flagged_answer,
source_flagged_empty,
query_empty,
query_too_long
series
CanvasDatasetSeries · object[]
rows
CanvasDatasetRows · object
value
object
statuses
object[]
truncated
boolean

A series, point or row cap cut the answer short.

histogram
object

Per-bucket values stacked by series, an optional overlay line and the ranges the source could not collect; a null value is not collected, never zero.

previous
CanvasDatasetPeriod · object

The same query over the previous period.