Skip to content

Query agent metric

Request

Compute an agent-anchored metric over a period. Every aggregate the catalogue advertises is returned, zero-valued when the query matched nothing. Deactivated agents are included.

Security
ApiKeyAuth
Path
metricIdstringrequired

An agent-anchored metric id from List Metrics

Bodyapplication/jsonrequired

The metric query: its primary anchor, any secondary filters and the timezone

primaryFilterAgentPeriodPrimaryFilter (object)(AgentPrimaryFilter)required
One of:

Anchors the query on a time range

filtersArray of objects(SecondaryFilter)

Absent means no secondary filtering

timezonestringrequired

The zone the period is evaluated in; an invalid zone is rejected as a 400

POST
/beta/intelligence/agents/metrics/{metricId}
curl -i -X POST \
  'https://dev.dixa.io/beta/intelligence/agents/metrics/{metricId}' \
  -H 'Authorization: YOUR_API_KEY_HERE' \
  -H 'Content-Type: application/json' \
  -d '{
    "primaryFilter": {
      "period": {
        "interval": {
          "from": "2026-06-01T00:00:00Z",
          "to": "2026-07-01T00:00:00Z"
        }
      }
    },
    "timezone": "Europe/Copenhagen"
  }'

Responses

The computed aggregates, keyed by aggregate name

Bodyapplication/json
dataobjectrequired

The metric's computed values. Each key is an aggregate name from the metric's aggregates; every advertised aggregate is present even when the period matched nothing, zero-valued rather than omitted

Response
Working time with per-media-type availability, and away time broken down by custom status
{ "data": { "working": { … }, "away": { … } } }