Kong · Schema
AdvancedQuery
A query targeting the API usage analytics datasource.
API GatewayAI GatewayAI ConnectivityAgent GatewayEvent GatewayMCP RegistryService MeshLLMKafkaKonnectOpen Source
Properties
| Name | Type | Description |
|---|---|---|
| datasource | string | |
| metrics | object | |
| dimensions | array | List of attributes or entity types to group by. |
| filters | object | |
| granularity | object | |
| time_range | object |
JSON Schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "#/components/schemas/AdvancedQuery",
"title": "AdvancedQuery",
"description": "A query targeting the API usage analytics datasource.",
"type": "object",
"properties": {
"datasource": {
"type": "string",
"enum": [
"api_usage"
]
},
"metrics": {
"$ref": "#/components/schemas/AdvancedMetrics"
},
"dimensions": {
"description": "List of attributes or entity types to group by.",
"type": "array",
"items": {
"type": "string",
"enum": [
"api",
"api_package",
"api_product",
"api_product_version",
"application",
"consumer",
"control_plane",
"control_plane_group",
"country_code",
"data_plane_node",
"data_plane_node_version",
"gateway_service",
"portal",
"response_source",
"realm",
"route",
"status_code",
"status_code_grouped",
"time",
"upstream_status_code",
"upstream_status_code_grouped"
],
"x-speakeasy-unknown-values": "allow"
},
"example": [
"status_code_grouped"
],
"maxItems": 2
},
"filters": {
"$ref": "#/components/schemas/AdvancedFilters"
},
"granularity": {
"$ref": "#/components/schemas/Granularity"
},
"time_range": {
"$ref": "#/components/schemas/TimeRange"
}
},
"example": {
"datasource": "api_usage",
"time_range": {
"type": "relative",
"time_range": "24h",
"tz": "EST"
},
"dimensions": [
"time",
"gateway_service"
],
"filters": [
{
"operator": "in",
"field": "control_plane",
"value": [
"d5ac5d88-efed-4e10-9dfe-0b0a6646c219"
]
}
],
"granularity": "hourly",
"metrics": [
"request_count",
"response_latency_p99"
]
},
"additionalProperties": false,
"required": [
"datasource"
]
}