Query Application Analytics

Query

post
/api/v2/stats

Body

application/json

Object describing the query sent to analytics API.

QueryApplicationAnalytics

* Additional properties are NOT allowed.
start_msintegerrequired

Unix timestamp in milliseconds specifying the lower bound to return data for the query, inclusive.

end_msintegerrequired

Unix timestamp in milliseconds specifying upper bound to return data for the query, inclusive.

metricsarray[string]required

A property of your API (such as request count or latency) that you wish to query on.
Your chosen metric is aggregated within the specified dimensions, meaning that if you query ‘request count by application’, you’ll receive the total number of requests each application received within the given time frame. Some metrics, such as latency and response size, have more complicated aggregations: selecting P99 will result in the 99th percentile of the chosen metric.

Allowed values:REQUEST_COUNTREQUEST_PER_MINUTERESPONSE_LATENCY_P99RESPONSE_LATENCY_P95RESPONSE_LATENCY_P50RESPONSE_SIZE_P99RESPONSE_SIZE_P95RESPONSE_SIZE_P50REQUEST_SIZE_P99REQUEST_SIZE_P95REQUEST_SIZE_P50

>= 1 items<= 1 items

dimensionsarray[string]

The dimensions for the query. A query may have up to 2 dimensions, including time.
If no dimensions are provided, the report will simply return the provided metric aggregated across
all available data.

Allowed values:API_PRODUCT_VERSIONAPPLICATIONSTATUS_CODESTATUS_CODE_GROUPEDTIME

Default:[]

>= 0 items<= 2 items

granularity_msinteger

granularity_ms is only valid for queries that include a time dimension, and it specifies the time buckets in for the returned data.

Default:86400000

filterOne Of
array

Default:[]

ApiProductVersionFilterobject
* Additional properties are NOT allowed.
Show Child Parameters

Response

application/json

A response from an Application Analytics query.

* Additional properties are NOT allowed.
metaobject

Query response metadata.

* Additional properties are NOT allowed.
Show Child Parameters
recordsarray[object]

A response record.

* Additional properties are NOT allowed.
Show Child Parameters
application/json

Get Application Analytics Config

Get config for application analytics

get
/api/v2/stats/config

Response

application/json

Get config

GetConfigResponse

* Additional properties are NOT allowed.
analyticsobject | nullrequired

Null if analytics is not enabled.

* Additional properties are NOT allowed.
Show Child Parameters
application/json

QueryApplicationAnalytics

object
* Additional properties are NOT allowed.
start_msintegerrequired

Unix timestamp in milliseconds specifying the lower bound to return data for the query, inclusive.

end_msintegerrequired

Unix timestamp in milliseconds specifying upper bound to return data for the query, inclusive.

metricsarray[string]required

A property of your API (such as request count or latency) that you wish to query on.
Your chosen metric is aggregated within the specified dimensions, meaning that if you query ‘request count by application’, you’ll receive the total number of requests each application received within the given time frame. Some metrics, such as latency and response size, have more complicated aggregations: selecting P99 will result in the 99th percentile of the chosen metric.

Allowed values:REQUEST_COUNTREQUEST_PER_MINUTERESPONSE_LATENCY_P99RESPONSE_LATENCY_P95RESPONSE_LATENCY_P50RESPONSE_SIZE_P99RESPONSE_SIZE_P95RESPONSE_SIZE_P50REQUEST_SIZE_P99REQUEST_SIZE_P95REQUEST_SIZE_P50

>= 1 items<= 1 items

dimensionsarray[string]

The dimensions for the query. A query may have up to 2 dimensions, including time.
If no dimensions are provided, the report will simply return the provided metric aggregated across
all available data.

Allowed values:API_PRODUCT_VERSIONAPPLICATIONSTATUS_CODESTATUS_CODE_GROUPEDTIME

Default:[]

>= 0 items<= 2 items

granularity_msinteger

granularity_ms is only valid for queries that include a time dimension, and it specifies the time buckets in for the returned data.

Default:86400000

filterOne Of
array

Default:[]

ApiProductVersionFilterobject
* Additional properties are NOT allowed.
Show Child Parameters
Example

FilterType

string

The type of filter to apply. IN filters will limit results to only the specified values, while NOT_IN filters will exclude the specified values.

Allowed values:INNOT_IN

ApiProductVersionFilter

object
* Additional properties are NOT allowed.
dimensionstringrequired

The dimension to filter.

Allowed values:API_PRODUCT_VERSION

typestringrequired

The type of filter to apply. IN filters will limit results to only the specified values, while NOT_IN filters will exclude the specified values.

Allowed values:INNOT_IN

valuesarray[string]required

The UUIDs of the API product versions to include in the results.

Match pattern:^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$

Example