query

POST /query/_mpl

Changed on

Runs an MPL query against metrics datasets in this edge deployment. The response format follows the format parameter or the Accept header and defaults to metrics-v2. Returns 429 when a query cost limit is exhausted.

Request

  • Base URL
    https://{axiom-domain}/v1
  • Auth
    OAuth 2
    Authorization codehttps://accounts.google.com/o/oauth2/v2/auth
    Token URLhttps://www.googleapis.com/oauth2/v4/token
    Scopesquery|read
  • TypeScript
    A function with typed inputs. Its response is checked against the schema.

Query parameters

format'metrics-v1' | 'metrics-v2' | 'metrics-v3' | 'metrics-v4'

Response format. If omitted, the Accept header is used for content negotiation. Defaults to metrics-v2 when neither is specified.

Request body

endTimestring required

End time for the query range

mplstring

The MPL query.

startTimestring required

start and end time for the query, these must be specified as RFC3339 strings or using relative time expressions (e.g. now-1h, now-1d, now-1w, etc)

Response

Query result in the requested format.

MetricsResult required

Metrics query result (streaming binary data)

Changes

    • warning

      removed the optional property from the response with the status

    • info

      added the new enum value metrics-v3 to the query request parameter format

    • info

      added the new enum value metrics-v4 to the query request parameter format

    • info

      added the non-success response with the status

    • info

      added the optional property to the response with the status