v48

latestOpenAPI 3.0.3Apache 2.0raw.githubusercontent.com2026-08-041562132.7 KB
definition

Query available facets for a specific metric

Returns a list of available facets that can be used to group data for a specific metric within an API type, including their data types.

get/environments/{envId}/analytics/definition/metrics/{metricName}/facets

Path parameters

envIdstring required

The unique ID of your environment

metricName'HTTP_REQUESTS' | 'HTTP_ERRORS' | 'HTTP_ERROR_RATE' | 'HTTP_REQUEST_CONTENT_LENGTH' | 'HTTP_RESPONSE_CONTENT_LENGTH' | 'HTTP_ENDPOINT_RESPONSE_TIME' | 'HTTP_GATEWAY_RESPONSE_TIME' | 'HTTP_GATEWAY_LATENCY' | 'LLM_PROMPT_TOKEN_SENT' | 'LLM_PROMPT_TOKEN_RECEIVED' | 'LLM_PROMPT_TOKEN_SENT_COST' | 'LLM_PROMPT_TOKEN_RECEIVED_COST' | 'LLM_PROMPT_TOTAL_TOKEN' | 'LLM_PROMPT_TOKEN_TOTAL_COST' | 'MESSAGE_PAYLOAD_SIZE' | 'MESSAGES' | 'MESSAGE_ERRORS' | 'MESSAGE_GATEWAY_LATENCY' | 'EDGE_DETECTION_COUNT' | 'EDGE_TOKENS_IN' | 'EDGE_TOKENS_OUT' | 'EDGE_HEARTBEAT_COUNT' | 'NATIVE_CONNECTIONS_SUMMARY' required

Available metric names for analytics queries

The metric identifier for which to retrieve filter specifications

Response

The response contains a list of available facets for the specified metric that can be used for grouping analytics data, including their data types.

Example response

{
  "data": [
    {
      "name": "API",
      "label": "API",
      "type": "KEYWORD"
    },
    {
      "name": "APPLICATION",
      "label": "Application",
      "type": "KEYWORD"
    },
    {
      "name": "GATEWAY",
      "label": "Gateway",
      "type": "KEYWORD"
    }
  ]
}