v47

OpenAPI 3.0.3Apache 2.0raw.githubusercontent.com2026-08-011562132.1 KB
computation

Query time series analytics

Return data points over time with optional grouping by facets.

Time series responses will include the lower and upper bound of the time range as the first and last buckets.

post/environments/{envId}/analytics/time-series

Path parameters

envIdstring required

The unique ID of your environment

Request body

byFacetName[]

List of facet names to group time-series buckets (up to two facets)

limitinteger

Maximum number of nested buckets to return

Example request

{
  "timeRange": {
    "from": "2025-01-01T00:00:00Z",
    "to": "2025-01-31T23:59:59Z"
  },
  "interval": 3600000,
  "by": [
    "API"
  ],
  "filters": [
    {
      "name": "API",
      "operator": "EQ",
      "value": "7b6ebef3-6236-4ac5-815e-d3dcef83df5d"
    }
  ],
  "metrics": [
    {
      "name": "HTTP_REQUESTS",
      "measures": [
        "COUNT"
      ]
    },
    {
      "name": "HTTP_GATEWAY_RESPONSE_TIME",
      "measures": [
        "AVG"
      ]
    }
  ]
}

Response

Time series analytics response

Example response

{
  "metrics": [
    {
      "name": "HTTP_REQUESTS",
      "unit": "NUMBER",
      "buckets": [
        {
          "key": "2025-01-01T00:00:00Z",
          "timestamp": 1735689600000,
          "type": "GROUP",
          "buckets": [
            {
              "key": "a5954f6e-1d95-463a-9a41-2442c575d022",
              "name": "api-1",
              "type": "LEAF",
              "measures": [
                {
                  "name": "COUNT",
                  "value": 1234
                }
              ]
            },
            {
              "key": "12bff449-1556-491c-8e34-c1c93b27e1cb",
              "name": "api-2",
              "type": "LEAF",
              "measures": [
                {
                  "name": "COUNT",
                  "value": 989
                }
              ]
            }
          ]
        },
        {
          "key": "2025-01-01T00:01:00Z",
          "timestamp": 1735689660000,
          "type": "GROUP",
          "buckets": [
            {
              "key": "a5954f6e-1d95-463a-9a41-2442c575d022",
              "name": "api-1",
              "type": "LEAF",
              "measures": [
                {
                  "name": "COUNT",
                  "value": 873
                }
              ]
            },
            {
              "key": "12bff449-1556-491c-8e34-c1c93b27e1cb",
              "name": "api-2",
              "type": "LEAF",
              "measures": [
                {
                  "name": "COUNT",
                  "value": 938
                }
              ]
            }
          ]
        }
      ]
    }
  ]
}