APIContext Stats API

Latency, pass/fail, HTTP-code and failure statistics for a monitored API call, by period, by date range and by monitoring location. 11 operations.

Operations 11

GET /api/2/calls/{call_id}/stats/ Get-Call-Stats #
GET /api/2/calls/{call_id}/stats/since Get-Call-Stats-Since #
GET /api/2/calls/{call_id}/stats/before Get-Call-Stats-Before #
GET /api/2/calls/{call_id}/stats/http_codes Get-Call-Http-Codes #
GET /api/2/calls/{call_id}/stats/failures Get-Call-Failures #
GET /api/2/calls/{call_id}/stats/passfail Get-Call-Passfail #
GET /api/2/calls/{call_id}/stats/passfail_total Get-Call-Passfail-Total #
GET /api/2/calls/{call_id}/stats/passfail_range Get-Call-Passfail-Range #
GET /api/2/calls/{call_id}/stats/legacy/passfail Get-Call-Legacy-Passfail #
GET /api/2/calls/{call_id}/stats/legacy/passfail_range Get-Call-Legacy-Passfail-Range #
GET /api/2/calls/{call_id}/stats/metrics/{location_id}/ Get-Call-Metrics #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/apicontext-stats-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

apicontext-statistics-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: APIContext Stats API
  description: API for the APImetrics platform This document is the 'Stats' slice of the APIContext (APImetrics)
    platform OpenAPI published at https://client.apimetrics.io/openapi.json.
  version: v2026-09-02
  contact:
    name: APIContext Support
    url: https://apicontext.io/
    email: support@apicontext.com
  license:
    name: Apache 2.0
    url: https://www.apache.org/licenses/LICENSE-2.0.html
  termsOfService: http://apimetrics.io/tos/
servers:
- url: https://client.apimetrics.io
  description: APIContext (APImetrics) platform API
tags:
- name: Stats
  description: Per-call performance and pass/fail statistics
paths:
  /api/2/calls/{call_id}/stats/:
    get:
      tags:
      - Stats
      summary: Get-Call-Stats
      description: Aggregated performance stats for a single period.
      operationId: get-call-stats
      security:
      - OAuth2: []
      - ApiKey: []
      parameters:
      - name: call_id
        in: path
        required: true
        schema:
          type: string
          pattern: ^[A-Za-z0-9_-]+$
          title: API Monitor ID
      - name: kind
        in: query
        required: false
        schema:
          $ref: '#/components/schemas/StatsKind'
          description: Aggregation period.
          default: DAY
        description: Aggregation period.
      - name: type
        in: query
        required: false
        schema:
          $ref: '#/components/schemas/StatsType'
          description: Result-code filter; `ALL` counts every result.
          default: ALL
        description: Result-code filter; `ALL` counts every result.
      - name: metric
        in: query
        required: false
        schema:
          $ref: '#/components/schemas/StatsMetric'
          description: Latency metric to aggregate.
          default: total_time
        description: Latency metric to aggregate.
      - name: location_id
        in: query
        required: false
        schema:
          type: string
          description: Agent location id to filter to, or `__ALL__` for all locations.
          examples:
          - __ALL__
          default: __ALL__
          title: Location Id
        description: Agent location id to filter to, or `__ALL__` for all locations.
      - name: time
        in: query
        required: false
        schema:
          anyOf:
          - type: string
            format: date-time
          - type: 'null'
          description: Point in time selecting the period to report (ISO 8601, UTC assumed if no offset).
            Defaults to now.
          examples:
          - '2024-01-01T12:00:00Z'
          title: Time
        description: Point in time selecting the period to report (ISO 8601, UTC assumed if no offset).
          Defaults to now.
      - name: apimetrics-project-id
        in: header
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Apimetrics-Project-Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StatResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/2/calls/{call_id}/stats/since:
    get:
      tags:
      - Stats
      summary: Get-Call-Stats-Since
      description: Performance buckets from a start time forwards.
      operationId: get-call-stats-since
      security:
      - OAuth2: []
      - ApiKey: []
      parameters:
      - name: call_id
        in: path
        required: true
        schema:
          type: string
          pattern: ^[A-Za-z0-9_-]+$
          title: API Monitor ID
      - name: kind
        in: query
        required: false
        schema:
          $ref: '#/components/schemas/ListStatsKind'
          description: Aggregation period (`RAW` for per-result rows).
          default: DAY
        description: Aggregation period (`RAW` for per-result rows).
      - name: type
        in: query
        required: false
        schema:
          $ref: '#/components/schemas/StatsType'
          description: Result-code filter; `ALL` counts every result.
          default: ALL
        description: Result-code filter; `ALL` counts every result.
      - name: metric
        in: query
        required: false
        schema:
          $ref: '#/components/schemas/StatsMetric'
          description: Latency metric to aggregate.
          default: total_time
        description: Latency metric to aggregate.
      - name: location_id
        in: query
        required: false
        schema:
          type: string
          description: Agent location id to filter to, or `__ALL__` for all locations.
          examples:
          - __ALL__
          default: __ALL__
          title: Location Id
        description: Agent location id to filter to, or `__ALL__` for all locations.
      - name: limit
        in: query
        required: false
        schema:
          anyOf:
          - type: integer
            minimum: 1
          - type: 'null'
          description: Maximum number of rows to return (default 1000 aggregated, 5000 for RAW).
          examples:
          - 1000
          title: Limit
        description: Maximum number of rows to return (default 1000 aggregated, 5000 for RAW).
      - name: time
        in: query
        required: false
        schema:
          anyOf:
          - type: string
            format: date-time
          - type: 'null'
          description: Point in time selecting the period to report (ISO 8601, UTC assumed if no offset).
            Defaults to now.
          examples:
          - '2024-01-01T12:00:00Z'
          title: Time
        description: Point in time selecting the period to report (ISO 8601, UTC assumed if no offset).
          Defaults to now.
      - name: start
        in: query
        required: false
        schema:
          anyOf:
          - type: string
            format: date-time
          - type: 'null'
          description: Start of the reporting window (ISO 8601). Clamped to the call's creation time.
          examples:
          - '2024-01-01T00:00:00Z'
          title: Start
        description: Start of the reporting window (ISO 8601). Clamped to the call's creation time.
      - name: end
        in: query
        required: false
        schema:
          anyOf:
          - type: string
            format: date-time
          - type: 'null'
          description: End of the reporting window (ISO 8601). Clamped to now.
          examples:
          - '2024-01-02T00:00:00Z'
          title: End
        description: End of the reporting window (ISO 8601). Clamped to now.
      - name: apimetrics-project-id
        in: header
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Apimetrics-Project-Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StatListResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/2/calls/{call_id}/stats/before:
    get:
      tags:
      - Stats
      summary: Get-Call-Stats-Before
      description: Performance buckets up to an end time.
      operationId: get-call-stats-before
      security:
      - OAuth2: []
      - ApiKey: []
      parameters:
      - name: call_id
        in: path
        required: true
        schema:
          type: string
          pattern: ^[A-Za-z0-9_-]+$
          title: API Monitor ID
      - name: kind
        in: query
        required: false
        schema:
          $ref: '#/components/schemas/ListStatsKind'
          description: Aggregation period (`RAW` for per-result rows).
          default: DAY
        description: Aggregation period (`RAW` for per-result rows).
      - name: type
        in: query
        required: false
        schema:
          $ref: '#/components/schemas/StatsType'
          description: Result-code filter; `ALL` counts every result.
          default: ALL
        description: Result-code filter; `ALL` counts every result.
      - name: metric
        in: query
        required: false
        schema:
          $ref: '#/components/schemas/StatsMetric'
          description: Latency metric to aggregate.
          default: total_time
        description: Latency metric to aggregate.
      - name: location_id
        in: query
        required: false
        schema:
          type: string
          description: Agent location id to filter to, or `__ALL__` for all locations.
          examples:
          - __ALL__
          default: __ALL__
          title: Location Id
        description: Agent location id to filter to, or `__ALL__` for all locations.
      - name: limit
        in: query
        required: false
        schema:
          anyOf:
          - type: integer
            minimum: 1
          - type: 'null'
          description: Maximum number of rows to return (default 1000 aggregated, 5000 for RAW).
          examples:
          - 1000
          title: Limit
        description: Maximum number of rows to return (default 1000 aggregated, 5000 for RAW).
      - name: time
        in: query
        required: false
        schema:
          anyOf:
          - type: string
            format: date-time
          - type: 'null'
          description: Point in time selecting the period to report (ISO 8601, UTC assumed if no offset).
            Defaults to now.
          examples:
          - '2024-01-01T12:00:00Z'
          title: Time
        description: Point in time selecting the period to report (ISO 8601, UTC assumed if no offset).
          Defaults to now.
      - name: start
        in: query
        required: false
        schema:
          anyOf:
          - type: string
            format: date-time
          - type: 'null'
          description: Start of the reporting window (ISO 8601). Clamped to the call's creation time.
          examples:
          - '2024-01-01T00:00:00Z'
          title: Start
        description: Start of the reporting window (ISO 8601). Clamped to the call's creation time.
      - name: end
        in: query
        required: false
        schema:
          anyOf:
          - type: string
            format: date-time
          - type: 'null'
          description: End of the reporting window (ISO 8601). Clamped to now.
          examples:
          - '2024-01-02T00:00:00Z'
          title: End
        description: End of the reporting window (ISO 8601). Clamped to now.
      - name: apimetrics-project-id
        in: header
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Apimetrics-Project-Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StatListResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/2/calls/{call_id}/stats/http_codes:
    get:
      tags:
      - Stats
      summary: Get-Call-Http-Codes
      description: HTTP status-code breakdown for a single period.
      operationId: get-call-http-codes
      security:
      - OAuth2: []
      - ApiKey: []
      parameters:
      - name: call_id
        in: path
        required: true
        schema:
          type: string
          pattern: ^[A-Za-z0-9_-]+$
          title: API Monitor ID
      - name: kind
        in: query
        required: false
        schema:
          $ref: '#/components/schemas/BreakdownKind'
          description: Aggregation period.
          default: MONTH
        description: Aggregation period.
      - name: location_id
        in: query
        required: false
        schema:
          type: string
          description: Agent location id to filter to, or `__ALL__` for all locations.
          examples:
          - __ALL__
          default: __ALL__
          title: Location Id
        description: Agent location id to filter to, or `__ALL__` for all locations.
      - name: time
        in: query
        required: false
        schema:
          anyOf:
          - type: string
            format: date-time
          - type: 'null'
          description: Point in time selecting the period to report (ISO 8601, UTC assumed if no offset).
            Defaults to now.
          examples:
          - '2024-01-01T12:00:00Z'
          title: Time
        description: Point in time selecting the period to report (ISO 8601, UTC assumed if no offset).
          Defaults to now.
      - name: apimetrics-project-id
        in: header
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Apimetrics-Project-Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HttpBreakdownResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/2/calls/{call_id}/stats/failures:
    get:
      tags:
      - Stats
      summary: Get-Call-Failures
      description: 'Deprecated: use the breakdown endpoint instead.'
      operationId: get-call-failures
      security:
      - OAuth2: []
      - ApiKey: []
      parameters:
      - name: call_id
        in: path
        required: true
        schema:
          type: string
          pattern: ^[A-Za-z0-9_-]+$
          title: API Monitor ID
      - name: apimetrics-project-id
        in: header
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Apimetrics-Project-Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/2/calls/{call_id}/stats/passfail:
    get:
      tags:
      - Stats
      summary: Get-Call-Passfail
      description: Pass/warning/failure counts for a single period.
      operationId: get-call-passfail
      security:
      - OAuth2: []
      - ApiKey: []
      parameters:
      - name: call_id
        in: path
        required: true
        schema:
          type: string
          pattern: ^[A-Za-z0-9_-]+$
          title: API Monitor ID
      - name: kind
        in: query
        required: false
        schema:
          $ref: '#/components/schemas/PassFailKind'
          description: Aggregation period.
          default: MONTH
        description: Aggregation period.
      - name: location_id
        in: query
        required: false
        schema:
          type: string
          description: Agent location id to filter to, or `__ALL__` for all locations.
          examples:
          - __ALL__
          default: __ALL__
          title: Location Id
        description: Agent location id to filter to, or `__ALL__` for all locations.
      - name: time
        in: query
        required: false
        schema:
          anyOf:
          - type: string
            format: date-time
          - type: 'null'
          description: Point in time selecting the period to report (ISO 8601, UTC assumed if no offset).
            Defaults to now.
          examples:
          - '2024-01-01T12:00:00Z'
          title: Time
        description: Point in time selecting the period to report (ISO 8601, UTC assumed if no offset).
          Defaults to now.
      - name: format
        in: query
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          description: Any non-empty value returns the raw combined stats map instead of the reshaped
            pass/warning/failure counts.
          title: Format
        description: Any non-empty value returns the raw combined stats map instead of the reshaped pass/warning/failure
          counts.
      - name: apimetrics-project-id
        in: header
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Apimetrics-Project-Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                anyOf:
                - $ref: '#/components/schemas/PassFailResponse'
                - $ref: '#/components/schemas/PassFailTotalResponse'
                title: Response Get-Call-Passfail
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/2/calls/{call_id}/stats/passfail_total:
    get:
      tags:
      - Stats
      summary: Get-Call-Passfail-Total
      description: Overall pass/fail totals over the call's most recent hour range.
      operationId: get-call-passfail-total
      security:
      - OAuth2: []
      - ApiKey: []
      parameters:
      - name: call_id
        in: path
        required: true
        schema:
          type: string
          pattern: ^[A-Za-z0-9_-]+$
          title: API Monitor ID
      - name: start
        in: query
        required: false
        schema:
          anyOf:
          - type: string
            format: date-time
          - type: 'null'
          description: Start of the reporting window (ISO 8601). Clamped to the call's creation time.
          examples:
          - '2024-01-01T00:00:00Z'
          title: Start
        description: Start of the reporting window (ISO 8601). Clamped to the call's creation time.
      - name: end
        in: query
        required: false
        schema:
          anyOf:
          - type: string
            format: date-time
          - type: 'null'
          description: End of the reporting window (ISO 8601). Clamped to now.
          examples:
          - '2024-01-02T00:00:00Z'
          title: End
        description: End of the reporting window (ISO 8601). Clamped to now.
      - name: apimetrics-project-id
        in: header
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Apimetrics-Project-Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PassFailTotalResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/2/calls/{call_id}/stats/passfail_range:
    get:
      tags:
      - Stats
      summary: Get-Call-Passfail-Range
      description: Pass/fail counts grouped by period over a range.
      operationId: get-call-passfail-range
      security:
      - OAuth2: []
      - ApiKey: []
      parameters:
      - name: call_id
        in: path
        required: true
        schema:
          type: string
          pattern: ^[A-Za-z0-9_-]+$
          title: API Monitor ID
      - name: kind
        in: query
        required: false
        schema:
          $ref: '#/components/schemas/PassFailKind'
          description: Grouping period.
          default: MONTH
        description: Grouping period.
      - name: location_id
        in: query
        required: false
        schema:
          type: string
          description: Agent location id to filter to, or `__ALL__` for all locations.
          examples:
          - __ALL__
          default: __ALL__
          title: Location Id
        description: Agent location id to filter to, or `__ALL__` for all locations.
      - name: start
        in: query
        required: false
        schema:
          anyOf:
          - type: string
            format: date-time
          - type: 'null'
          description: Start of the reporting window (ISO 8601). Clamped to the call's creation time.
          examples:
          - '2024-01-01T00:00:00Z'
          title: Start
        description: Start of the reporting window (ISO 8601). Clamped to the call's creation time.
      - name: end
        in: query
        required: false
        schema:
          anyOf:
          - type: string
            format: date-time
          - type: 'null'
          description: End of the reporting window (ISO 8601). Clamped to now.
          examples:
          - '2024-01-02T00:00:00Z'
          title: End
        description: End of the reporting window (ISO 8601). Clamped to now.
      - name: apimetrics-project-id
        in: header
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Apimetrics-Project-Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PassFailRangeResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/2/calls/{call_id}/stats/legacy/passfail:
    get:
      tags:
      - Stats
      summary: Get-Call-Legacy-Passfail
      description: Pass/fail counts for a single period (legacy synopsis endpoint).
      operationId: get-call-legacy-passfail
      security:
      - OAuth2: []
      - ApiKey: []
      parameters:
      - name: call_id
        in: path
        required: true
        schema:
          type: string
          pattern: ^[A-Za-z0-9_-]+$
          title: API Monitor ID
      - name: kind
        in: query
        required: false
        schema:
          $ref: '#/components/schemas/BreakdownKind'
          description: Aggregation period.
          default: MONTH
        description: Aggregation period.
      - name: location_id
        in: query
        required: false
        schema:
          type: string
          description: Agent location id to filter to, or `__ALL__` for all locations.
          examples:
          - __ALL__
          default: __ALL__
          title: Location Id
        description: Agent location id to filter to, or `__ALL__` for all locations.
      - name: time
        in: query
        required: false
        schema:
          anyOf:
          - type: string
            format: date-time
          - type: 'null'
          description: Point in time selecting the period to report (ISO 8601, UTC assumed if no offset).
            Defaults to now.
          examples:
          - '2024-01-01T12:00:00Z'
          title: Time
        description: Point in time selecting the period to report (ISO 8601, UTC assumed if no offset).
          Defaults to now.
      - name: apimetrics-project-id
        in: header
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Apimetrics-Project-Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LegacyPassFailResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/2/calls/{call_id}/stats/legacy/passfail_range:
    get:
      tags:
      - Stats
      summary: Get-Call-Legacy-Passfail-Range
      description: Pass/fail counts grouped by period (legacy synopsis endpoint).
      operationId: get-call-legacy-passfail-range
      security:
      - OAuth2: []
      - ApiKey: []
      parameters:
      - name: call_id
        in: path
        required: true
        schema:
          type: string
          pattern: ^[A-Za-z0-9_-]+$
          title: API Monitor ID
      - name: kind
        in: query
        required: false
        schema:
          $ref: '#/components/schemas/BreakdownKind'
          description: Grouping period.
          default: MONTH
        description: Grouping period.
      - name: location_id
        in: query
        required: false
        schema:
          type: string
          description: Agent location id to filter to, or `__ALL__` for all locations.
          examples:
          - __ALL__
          default: __ALL__
          title: Location Id
        description: Agent location id to filter to, or `__ALL__` for all locations.
      - name: start
        in: query
        required: false
        schema:
          anyOf:
          - type: string
            format: date-time
          - type: 'null'
          description: Start of the reporting window (ISO 8601). Clamped to the call's creation time.
          examples:
          - '2024-01-01T00:00:00Z'
          title: Start
        description: Start of the reporting window (ISO 8601). Clamped to the call's creation time.
      - name: end
        in: query
        required: false
        schema:
          anyOf:
          - type: string
            format: date-time
          - type: 'null'
          description: End of the reporting window (ISO 8601). Clamped to now.
          examples:
          - '2024-01-02T00:00:00Z'
          title: End
        description: End of the reporting window (ISO 8601). Clamped to now.
      - name: apimetrics-project-id
        in: header
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Apimetrics-Project-Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LegacyPassFailRangeResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/2/calls/{call_id}/stats/metrics/{location_id}/:
    get:
      tags:
      - Stats
      summary: Get-Call-Metrics
      description: Quantile statistics for one or more metrics, grouped by domain.
      operationId: get-call-metrics
      security:
      - OAuth2: []
      - ApiKey: []
      parameters:
      - name: call_id
        in: path
        required: true
        schema:
          type: string
          pattern: ^[A-Za-z0-9_-]+$
          title: API Monitor ID
      - name: location_id
        in: path
        required: true
        schema:
          type: string
          description: Agent location id, or `__ALL__` for all locations.
          title: Location Id
        description: Agent location id, or `__ALL__` for all locations.
      - name: kind
        in: query
        required: false
        schema:
          $ref: '#/components/schemas/StatsKind'
          description: Aggregation period.
          default: DAY
        description: Aggregation period.
      - name: quantile
        in: query
        required: false
        schema:
          type: number
          maximum: 100
          minimum: 0
          description: Percentile to compute (0–100).
          default: 50.0
          title: Quantile
        description: Percentile to compute (0–100).
      - name: metric
        in: query
        required: false
        schema:
          $ref: '#/components/schemas/StatsMetric'
          description: Latency metric to aggregate.
          default: total_time_no_dns
        description: Latency metric to aggregate.
      - name: metric[]
        in: query
        required: false
        schema:
          anyOf:
          - type: array
            items:
              $ref: '#/components/schemas/StatsMetric'
          - type: 'null'
          description: Repeatable; one output column per metric. Overrides `metric`.
          title: Metric[]
        description: Repeatable; one output column per metric. Overrides `metric`.
      - name: category
        in: query
        required: false
        schema:
          anyOf:
          - $ref: '#/components/schemas/StatsCategory'
          - type: 'null'
          description: Restrict the quantile to a single result category.
          title: Category
        description: Restrict the quantile to a single result category.
      - name: dest_ip
        in: query
        required: false
        schema:
          type: string
          description: Group results by destination IP as well as domain/location when truthy (`1`/`t`/`true`).
          examples:
          - t
          default: t
          title: Dest Ip
        description: Group results by destination IP as well as domain/location when truthy (`1`/`t`/`true`).
      - name: time
        in: query
        required: false
        schema:
          anyOf:
          - type: string
            format: date-time
          - type: 'null'
          description: Point in time selecting the period to report (ISO 8601, UTC assumed if no offset).
            Defaults to now.
          examples:
          - '2024-01-01T12:00:00Z'
          title: Time
        description: Point in time selecting the period to report (ISO 8601, UTC assumed if no offset).
          Defaults to now.
      - name: start
        in: query
        required: false
        schema:
          anyOf:
          - type: string
            format: date-time
          - type: 'null'
          description: Start of the reporting window (ISO 8601). Clamped to the call's creation time.
          examples:
          - '2024-01-01T00:00:00Z'
          title: Start
        description: Start of the reporting window (ISO 8601). Clamped to the call's creation time.
      - name: end
        in: query
        required: false
        schema:
          anyOf:
          - type: string
            format: date-time
          - type: 'null'
          description: End of the reporting window (ISO 8601). Clamped to now.
          examples:
          - '2024-01-02T00:00:00Z'
          title: End
        description: End of the reporting window (ISO 8601). Clamped to now.
      - name: apimetrics-project-id
        in: header
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Apimetrics-Project-Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/QuantileResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  securitySchemes:
    OAuth2:
      type: oauth2
      flows:
        authorizationCode:
          scopes:
            openid: OpenID Connect identity
            profile: User profile
            email: User email address
          authorizationUrl: https://auth.apimetrics.io/authorize?audience=https://client.apimetrics.io
          tokenUrl: https://auth.apimetrics.io/oauth/token
    ApiKey:
      type: apiKey
      in: header
      name: X-Api-Key
  schemas:
    BreakdownKind:
      type: string
      enum:
      - HOUR
      - DAY
      - WEEK
      - MONTH
      title: BreakdownKind
      description: '``http_codes`` / ``legacy/passfail*`` — no YEAR.'
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    HttpBreakdownResponse:
      properties:
        meta:
          $ref: '#/components/schemas/_HttpBreakdownMeta'
        stat:
          $ref: '#/components/schemas/_HttpBreakdownStat'
      type: object
      required:
      - meta
      - stat
      title: HttpBreakdownResponse
    LegacyPassFailRangeRe

# --- truncated at 32 KB (45 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/apicontext/refs/heads/main/openapi/apicontext-statistics-api-openapi.yml