Portal API

v3.0.1OAS 3.0

Portal API

API Base URL
  • Server 1:https://custom.example.com

    Production

Security
portalAccessToken (apiKey)

The Developer portal cookie is meant to be used by the Developer API to authenticate with.

Additional Information
Contact Kong

Query Application Analytics

Pre-release Endpoint
This endpoint is currently in beta and is subject to change.

Query

post
https://custom.example.com/api/v3/stats

Body

application/json

Object describing the query sent to analytics API.

QueryApplicationAnalytics

* Additional properties are NOT allowed.
metricsarray[string]

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.

Allowed values:request_countrequest_per_minuteresponse_latency_averageresponse_size_averageresponse_size_sumrequest_size_averagerequest_size_sum

Default:request_count

>= 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:apiapplicationstatus_codestatus_code_groupedtime

Default:[]

>= 0 items<= 2 items

granularitystring

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

Allowed values:tenSecondlythirtySecondlyminutelyfiveMinutelytenMinutelythirtyMinutelyhourlytwoHourlytwelveHourlydailyweeklytrend

time_rangeOne Of

The time range to query.

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

RelativeTimeRangeDtoobject

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.

Show Child Parameters
filtersOne Of
array

Default:[]

ApiFilterobject
* 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
dataarray[object]

A response record.

* Additional properties are NOT allowed.
Show Child Parameters
post/api/v3/stats

Body

{
"time_range": {
"type": "relative",
"time_range": "24h",
"tz": "EST"
},
"metrics": [
"request_per_minute"
],
"filters": [
{
"field": "api",
"operator": "in",
"value": [
"417e47e8-ae7b-48a1-9b34-3f6835161de1"
]
}
]
}
 
application/json