Analytics

Query analytics data

Execute an analytics query with specified metrics, dimensions, filters, and time range. Management key required.

post/analytics/query

Request body

dimensionsstring[]
granularitystring

Time granularity

group_limitinteger

Maximum rows per distinct combination of dimensions. When omitted on time-series queries (granularity + dimensions), auto-computed to avoid truncating time windows. Explicit values override the default and may truncate time buckets if set lower than the number of buckets in the range. Ignored when no dimensions are specified.

limitinteger

Maximum total rows returned. Defaults to 1000. On time-series queries with dimensions and no explicit group_limit, the server may raise this to accommodate the expected number of unique time-bucket/dimension combinations.

metricsstring[] required

Example request

{
  "classifier_dimensions": {
    "classifier_id": "550e8400-e29b-41d4-a716-446655440000",
    "dimension_names": [
      "department"
    ]
  },
  "classifier_filters": {
    "classifier_id": "550e8400-e29b-41d4-a716-446655440000",
    "filters": [
      {
        "field": "department",
        "operator": "eq"
      }
    ]
  },
  "dimensions": [
    "model"
  ],
  "filters": [
    {
      "field": "model",
      "operator": "eq"
    }
  ],
  "granularity": "day",
  "group_limit": 100,
  "metrics": [
    "request_count"
  ],
  "order_by": {
    "field": "request_count"
  },
  "time_range": {
    "end": "2027-12-31T23:59:59Z",
    "start": "2027-12-31T23:59:59Z"
  }
}

Response

Analytics query results

Changes

Changed in 4 of the 303 revisions of this API.6

    • ○

      api tag Analytics added

      api-tag-added

    • ○

      api tag beta.Analytics removed

      api-tag-removed

    • ○

      added the new optional request property //

      new-optional-request-property

    • ○

      added the new optional request property

      new-optional-request-property

    • ○

      added the new optional request property

      new-optional-request-property

    • ○

      added the optional property / to the response with the status

      response-optional-property-added