Granularity

string

Force time grouping into buckets of the specified duration. Only has an effect if “time” is in the “dimensions” list.

The granularity of the result may be coarser than requested. The finest allowed granularity depends on the query’s time range: data farther in the past may have coarser granularity. The exact result granularity will be reported in the response meta.granularity_ms field.

If granularity is not specified and “time” is in the dimensions list, a default will be chosen based on the time range requested.

Different relative times support different granularities:

  • 15m => tenSecondly, thirtySecondly, minutely
  • 1h => tenSecondly, thirtySecondly, minutely, fiveMinutely, tenMinutely
  • 6h => thirtySecondly, minutely, fiveMinutely, tenMinutely, thirtyMinutely, hourly
  • 12h => minutely, fiveMinutely, tenMinutely, thirtyMinutely, hourly
  • 24h => fiveMinutely, tenMinutely, thirtyMinutely, hourly
  • 7d => thirtyMinutely, hourly, twoHourly, twelveHourly, daily
  • 30d => hourly, twoHourly, twelveHourly, daily, weekly

For special time ranges:

  • current_week, previous_week => thirtyMinutely, hourly, twoHourly, twelveHourly, daily
  • current_month, previous_month => hourly, twoHourly, twelveHourly, daily, weekly

For absolute time ranges, daily will be used.

Allowed values:tenSecondlythirtySecondlyminutelyfiveMinutelytenMinutelythirtyMinutelyhourlytwoHourlytwelveHourlydailyweekly

Relative time range

object

A duration representing a relative-to-now span of time. Generally the start time is floored to the requested granularity. Eg 7d from now, with 1day granularity initiated at 2024-01-08T17:11:00+05:00 will query for the time range from 2024-01-01T00:00:00+05:00 to 2024-01-08T17:11:00+05:00. The exact start and end timestamps are returned in the result query in the meta.start and meta.end fields. If the granularity for the previous query was 1hour, it would query a time range from 2024-01-01T17:00:00+05:00 to 2024-01-08T17:11:00+05:00.

tzstring

Default:Etc/UTC

typestringrequired

Allowed values:relative

time_rangestringrequired

Allowed values:15m1h6h12h24h7d30dcurrent_weekcurrent_monthprevious_weekprevious_month

Default:1h

Example

Absolute time range

object

A duration representing an exact start and end time.

tzstring

Default:Etc/UTC

typestringrequired

Allowed values:absolute

startstring(date-time)
endstring(date-time)
Example

TimeRange

The time range to query.

Default:{"type":"relative","time_range":"1h"}

One Of
tzstring

Default:Etc/UTC

typestringrequired

Allowed values:relative

time_rangestringrequired

Allowed values:15m1h6h12h24h7d30dcurrent_weekcurrent_monthprevious_weekprevious_month

Default:1h

Example

Error

object

standard error

statusintegerrequiredread-only

The HTTP status code of the error. Useful when passing the response
body to child properties in a frontend UI. Must be returned as an integer.

titlestringrequiredread-only

A short, human-readable summary of the problem. It should not
change between occurences of a problem, except for localization.
Should be provided as “Sentence case” for direct use in the UI.

typestringread-only

The error type.

instancestringrequiredread-only

Used to return the correlation ID back to the user, in the format
kong:trace:<correlation_id>. This helps us find the relevant logs
when a customer reports an issue.

detailstringrequiredread-only

A human readable explanation specific to this occurence of the problem.
This field may contain request/entity data to help the user understand
what went wrong. Enclose variable values in square brackets. Should be
provided as “Sentence case” for direct use in the UI.

Example