Explore metrics in the analyticcs platform

Post a query to the endpoint to retrieve aggregated metrics down to the minute. Data can be requested to group by any 2 dimensions, and any number of filter conditions.

post

Body

application/json

ExploreV2Dto

A query to launch at the API

metricsarray[string]required

List of aggregated metrics to collect across the requested time span.

Allowed values:request_countrequest_per_minuteresponse_latency_p99response_latency_p95response_latency_p50response_latency_averageupstream_latency_p99upstream_latency_p95upstream_latency_p50upstream_latency_averagekong_latency_p99kong_latency_p95kong_latency_p50kong_latency_averageresponse_size_p99response_size_p95response_size_p50request_size_p99request_size_p95request_size_p50request_size_averageresponse_size_average

Example:["request_count"]

dimensionsarray[string]

List of attributes or entity types to group by.

Allowed values:api_productapi_product_versionapplicationconsumercontrol_planecontrol_plane_groupdata_plane_nodegateway_serviceroutestatus_codestatus_code_groupedtime

>= 0 items<= 2 items

Example:["status_code_grouped"]

filtersarray[object]

A filter that specifies which data to include in the query

Show Child Parameters
granularitystring

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

If “trend” is chosen, the time range covered by the query will be twice the specified time range, and the granularity will be set such that two time buckets are returned, one for the given time range and one for the same time range prior.
For example:

time range: last 24 hours
granularity: trend

will return 2 time buckets (assuming both have data):

  • 48 hours ago to 24 hours ago
  • 24 hours ago to now

Another example:

time range: 2020-05-01 to 2020-05-15
granularity: trend

will return 2 time buckets:

  • 2020-04-15 through 2020-04-30
  • 2020-05-01 through 2020-05-15

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.

Allowed values:minutehourdayweektrend

time_rangeOne Of

The time range to query.

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

RelativeTimeRangeDtoV2object

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_ms and meta.end_ms 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.

Show Child Parameters
metaobject

Response

application/json

Aggregated results of the query

ExploreResultV2

dataarray[object]requiredread-only

Example:{"event":{"gateway_service":"d5ac5d88-efed-4e10-9dfe-0b0a6646c219:bf16907c-8673-4f9d-aa83-1f2ea9215055","request_count":1000,"response_latency_p99":23},"timestamp":"2024-01-16T00:00:00Z"}

Show Child Parameters
metaobjectrequiredread-only

Example:{"start_ms":1705428000000,"end_ms":1705429000000,"display":{"gateway_service":{"d5ac5d88-efed-4e10-9dfe-0b0a6646c219:bf16907c-8673-4f9d-aa83-111111111111":{"id":"d5ac5d88-efed-4e10-9dfe-0b0a6646c219:bf16907c-8673-4f9d-aa83-111111111111","deleted":true,"name":"Gateway Service Alpha"},"d5ac5d88-efed-4e10-9dfe-0b0a6646c219:bf16907c-8673-4f9d-aa83-1f2ea9215055":{"id":"d5ac5d88-efed-4e10-9dfe-0b0a6646c219:bf16907c-8673-4f9d-aa83-1f2ea9215055","deleted":false,"name":"Gateway Service Beta"}}},"metric_units":{"request_count":"cnt","response_latency_p99":"ms"},"granularity_ms":60000,"truncated":false,"limit":50,"query_id":"requested-query-id"}

Show Child Parameters
post/explore

Body

{ "time_range": { "type": "relative", "time_range": "24h", "tz": "EST" }, "dimensions": [ "time", "gateway_service" ], "filters": [ { "type": "in", "dimension": "control_plane", "values": [ "d5ac5d88-efed-4e10-9dfe-0b0a6646c219" ] } ], "granularity": "hour", "metrics": [ "response_latency_p99", "response_latency_p95", "response_latency_p50" ] }
 
application/json

AbsoluteTimeRangeDtoV2

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

RelativeTimeRangeDtoV2

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_ms and meta.end_ms 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

ExploreFilter

object

A filter that specifies which data to include in the query

dimensionstringrequired

Allowed values:api_productapi_product_versionapplicationconsumercontrol_planecontrol_plane_groupdata_plane_nodegateway_serviceroutestatus_codestatus_code_grouped

Example:status_code

typestringrequired

Allowed values:innot_inselector

Example:in

valuesarray[string]required
Example

ExploreV2Dto

object

A query to launch at the API

metricsarray[string]required

List of aggregated metrics to collect across the requested time span.

Allowed values:request_countrequest_per_minuteresponse_latency_p99response_latency_p95response_latency_p50response_latency_averageupstream_latency_p99upstream_latency_p95upstream_latency_p50upstream_latency_averagekong_latency_p99kong_latency_p95kong_latency_p50kong_latency_averageresponse_size_p99response_size_p95response_size_p50request_size_p99request_size_p95request_size_p50request_size_averageresponse_size_average

Example:request_count

dimensionsarray[string]

List of attributes or entity types to group by.

Allowed values:api_productapi_product_versionapplicationconsumercontrol_planecontrol_plane_groupdata_plane_nodegateway_serviceroutestatus_codestatus_code_groupedtime

>= 0 items<= 2 items

Example:status_code_grouped

filtersarray[object]

A filter that specifies which data to include in the query

Show Child Parameters
granularitystring

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

If “trend” is chosen, the time range covered by the query will be twice the specified time range, and the granularity will be set such that two time buckets are returned, one for the given time range and one for the same time range prior.
For example:

time range: last 24 hours
granularity: trend

will return 2 time buckets (assuming both have data):

  • 48 hours ago to 24 hours ago
  • 24 hours ago to now

Another example:

time range: 2020-05-01 to 2020-05-15
granularity: trend

will return 2 time buckets:

  • 2020-04-15 through 2020-04-30
  • 2020-05-01 through 2020-05-15

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.

Allowed values:minutehourdayweektrend

time_rangeOne Of

The time range to query.

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

RelativeTimeRangeDtoV2object

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_ms and meta.end_ms 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.

Show Child Parameters
metaobject
Example