Analytics

Run an analytics query

Changed on

Compute a metric over a filtered stream (traces, sessions, spans, scores, behaviors, moments), optionally broken down by a dimension and/or bucketed over time. Returns a tidy series — one point per breakdown value and/or time bucket — suitable for charts and reports.

post/v1/projects/{projectSlug}/analytics/query

Request

  • Base URL
    https://api.latitude.so
  • Auth
    HTTP bearer

Path parameters

projectSlugstring required

Project slug (human-readable identifier)

Project slug (human-readable identifier). The CLI can also read this from the LATITUDE_PROJECT_SLUG environment variable.

Request body

OR
OR
OR
OR
OR

Example request

{
  "range": {
    "fromIso": "2026-06-23T00:00:00Z",
    "toIso": "2026-06-30T00:00:00Z"
  }
}

Response

The analytics series

Changes

    • breaking

      the / request property type changed from no type to object

    • warning

      removed subschema #2 from the / request property allOf list

    • breaking

      removed subschema #1 subschema #2 subschema #3 from the request body oneOf list

    • info

      added subschema #1 subschema #2 subschema #3 to the request body oneOf list

    • info

      added the optional property // to the response with the status