Dashboard

Get metrics by dimension

Changed on

Returns time-series metrics grouped by a dimension. Span scope supports full filtering and dimensions. Trace scope accepts no body filters and only user or organization-key breakdowns. Thread scope accepts neither filters nor a breakdown dimension. Each requested metric is a top-level key containing an array of time buckets.

post/api/dashboard/time-series/breakdown/

Request

  • Base URL
    https://api.respan.ai
  • URL
    https://api.respan.ai/api/dashboard/time-series/breakdown/
  • Auth
    • HTTP bearer
    • or HTTP bearer

Query parameters

summary_type'daily' | 'weekly' | 'monthly' | 'quarterly' | 'yearly' | 'last_24h' | 'all'

Preset time range. Use this or explicit start_time / end_time.

datestring date

Base date used with summary_type presets.

start_timestring date-time

Optional explicit ISO start time.

end_timestring date-time

Optional explicit ISO end time.

time_tick'minute' | 'hour' | 'day'

Bucket granularity for time-series responses.

timezone_offsetnumber

Timezone offset, in hours, used when resolving preset ranges.

breakdown_by'model' | 'organization_key_id' | 'customer_identifier' | 'custom_identifier' | 'prompt_id' | 'deployment_id' | 'deployment_name' | 'provider_id'

Dimension to break the time series down by.

scope'span' | 'trace' | 'thread'

Aggregation unit.

Request body

metrics_to_aggregatestring[]

Metrics to return. Supported values depend on scope; when omitted the API returns number of requests, total cost, and total tokens.

Example request

{
  "filters": {
    "customer_identifier": {
      "operator": "",
      "value": [
        "alex@acme.dev"
      ]
    }
  }
}

Response

Metric-keyed time-series breakdown.

object required

Changes

    • breaking

      added subschema #2 to the request body allOf list

    • breaking

      the request's body type changed from object to no type

    • breaking

      added subschema #1 to the response property oneOf list for the response status

    • warning

      removed the request property

    • warning

      removed the request property

    • info

      api operation id dashboard_listMetricsBreakdown removed and replaced with listMetricsBreakdown

    • info

      the endpoint scheme security DashboardJwt was added to the API

    • info

      api tag Dashboard added

    • info

      api tag dashboard removed

    • info

      for the query request parameter timezone_offset, the format was generalized from double to no format

    • info

      removed from the response property oneOf list for the response status

    • breaking

      added to the response property oneOf list for the response status

    • info

      removed from the response property oneOf list for the response status