> ## Documentation Index
> Fetch the complete documentation index at: https://checkly-422f444a-mintlify-f27640bd.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# API checks

> Fetch detailed availability metrics and aggregated or non-aggregated API Check metrics across custom time ranges. For example, you can get the p99 and p95 of all the DNS phases of your API check together with the availability percentage for any time range.
**Rate-limiting is applied to this endpoint, you can send 30 requests / 60 seconds at most.**



## OpenAPI

````yaml get /v1/analytics/api-checks/{id}
openapi: 3.0.0
info:
  title: Checkly Public API
  version: v1
  description: >-
    These are the docs for the newly released Checkly Public API. If you have
    any questions, please do not hesitate to get in touch with us.
servers:
  - url: https://api.checklyhq.com
security:
  - Bearer: []
tags: []
paths:
  /v1/analytics/api-checks/{id}:
    get:
      tags:
        - Analytics
      summary: API checks
      description: >-
        Fetch detailed availability metrics and aggregated or non-aggregated API
        Check metrics across custom time ranges. For example, you can get the
        p99 and p95 of all the DNS phases of your API check together with the
        availability percentage for any time range.

        **Rate-limiting is applied to this endpoint, you can send 30 requests /
        60 seconds at most.**
      operationId: getV1AnalyticsApichecksId
      parameters:
        - schema:
            type: string
            minLength: 1
            format: uuid
          required: true
          name: id
          in: path
        - schema:
            type: string
            format: date
            description: >-
              Custom start time of reporting window in unix timestamp format.
              Setting a custom "from" timestamp overrides the use of any
              "quickRange".
          required: false
          description: >-
            Custom start time of reporting window in unix timestamp format.
            Setting a custom "from" timestamp overrides the use of any
            "quickRange".
          name: from
          in: query
        - schema:
            type: string
            format: date
            description: >-
              Custom end time of reporting window in unix timestamp format.
              Setting a custom "to" timestamp overrides the use of any
              "quickRange".
          required: false
          description: >-
            Custom end time of reporting window in unix timestamp format.
            Setting a custom "to" timestamp overrides the use of any
            "quickRange".
          name: to
          in: query
        - schema:
            type: string
            enum:
              - last24Hours
              - last7Days
              - last30Days
              - thisWeek
              - thisMonth
              - lastWeek
              - lastMonth
            default: last24Hours
            description: >-
              Preset reporting windows are used for quickly generating report on
              commonly used windows. Can be overridden by using a custom "to"
              and "from" timestamp.
          required: false
          description: >-
            Preset reporting windows are used for quickly generating report on
            commonly used windows. Can be overridden by using a custom "to" and
            "from" timestamp.
          name: quickRange
          in: query
        - schema:
            type: number
            minimum: 1
            maximum: 43200
            example: 1440
            description: >-
              The time interval to use for aggregating metrics in minutes. For
              example, five minutes is 5, 24 hours is 1440.
          required: false
          description: >-
            The time interval to use for aggregating metrics in minutes. For
            example, five minutes is 5, 24 hours is 1440.
          name: aggregationInterval
          in: query
        - schema:
            type: array
            items:
              type: string
              enum:
                - success
                - failure
            example:
              - failure
            description: >-
              Filter based on whether a check result was either failing or
              passing
          required: false
          description: Filter based on whether a check result was either failing or passing
          name: filterByStatus
          in: query
        - schema:
            type: string
            enum:
              - runLocation
              - statusCode
            description: >-
              Determines how the series data is grouped. Note that grouped
              queries are a bit more expensive and might take longer.
          required: false
          description: >-
            Determines how the series data is grouped. Note that grouped queries
            are a bit more expensive and might take longer.
          name: groupBy
          in: query
        - schema:
            type: array
            items:
              type: string
              enum:
                - responseTime
                - wait
                - dns
                - tcp
                - firstByte
                - download
                - availability
                - retries
                - responseTime_avg
                - responseTime_max
                - responseTime_median
                - responseTime_min
                - responseTime_p50
                - responseTime_p90
                - responseTime_p95
                - responseTime_p99
                - responseTime_stddev
                - responseTime_sum
                - wait_avg
                - wait_max
                - wait_median
                - wait_min
                - wait_p50
                - wait_p90
                - wait_p95
                - wait_p99
                - wait_stddev
                - wait_sum
                - dns_avg
                - dns_max
                - dns_median
                - dns_min
                - dns_p50
                - dns_p90
                - dns_p95
                - dns_p99
                - dns_stddev
                - dns_sum
                - tcp_avg
                - tcp_max
                - tcp_median
                - tcp_min
                - tcp_p50
                - tcp_p90
                - tcp_p95
                - tcp_p99
                - tcp_stddev
                - tcp_sum
                - firstByte_avg
                - firstByte_max
                - firstByte_median
                - firstByte_min
                - firstByte_p50
                - firstByte_p90
                - firstByte_p95
                - firstByte_p99
                - firstByte_stddev
                - firstByte_sum
                - download_avg
                - download_max
                - download_median
                - download_min
                - download_p50
                - download_p90
                - download_p95
                - download_p99
                - download_stddev
                - download_sum
            description: >-
              Available metrics for API Checks. You can pass multiple metrics as
              a comma separated string.
          required: true
          description: >-
            Available metrics for API Checks. You can pass multiple metrics as a
            comma separated string.
          name: metrics
          in: query
        - schema:
            type: integer
            description: Limit the number of results
            default: 10
            minimum: 1
            maximum: 100
          required: false
          description: Limit the number of results
          name: limit
          in: query
        - schema:
            type: number
            minimum: 0
            exclusiveMinimum: true
            default: 1
            description: Page number
          required: false
          description: Page number
          name: page
          in: query
        - schema:
            type: string
            format: uuid
            description: >-
              Your Checkly account ID, you can find it at
              https://app.checklyhq.com/settings/account/general
          required: false
          description: >-
            Your Checkly account ID, you can find it at
            https://app.checklyhq.com/settings/account/general
          name: x-checkly-account
          in: header
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AnalyticsApiCheckResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
components:
  schemas:
    AnalyticsApiCheckResponse:
      type: object
      properties:
        checkId:
          type: string
          format: uuid
        name:
          type: string
        checkType:
          type: string
          enum:
            - AGENTIC
            - API
            - BROWSER
            - HEARTBEAT
            - ICMP
            - MULTI_STEP
            - TCP
            - PLAYWRIGHT
            - TRACEROUTE
            - URL
            - DNS
            - SSL
            - GRPC
        activated:
          type: boolean
        muted:
          type: boolean
        frequency:
          type: number
        from:
          type: string
          format: date-time
        to:
          type: string
          format: date-time
        tags:
          type: array
          items:
            type: string
        series:
          type: array
          items:
            $ref: '#/components/schemas/AnalyticsSeriesEntry'
        pagination:
          $ref: '#/components/schemas/AnalyticsPagination'
        metadata:
          $ref: '#/components/schemas/AnalyticsApiCheckMetadata'
    ApiError:
      type: object
      properties:
        statusCode:
          type: number
        error:
          type: string
        message:
          type: string
      required:
        - statusCode
        - error
        - message
    AnalyticsSeriesEntry:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/AnalyticsSeriesData'
      required:
        - data
      additionalProperties: true
    AnalyticsPagination:
      type: object
      properties:
        page:
          type: number
        limit:
          type: number
    AnalyticsApiCheckMetadata:
      type: object
      properties:
        responseTime:
          $ref: '#/components/schemas/AnalyticsMetricMetadata'
        wait:
          $ref: '#/components/schemas/AnalyticsMetricMetadata'
        dns:
          $ref: '#/components/schemas/AnalyticsMetricMetadata'
        tcp:
          $ref: '#/components/schemas/AnalyticsMetricMetadata'
        firstByte:
          $ref: '#/components/schemas/AnalyticsMetricMetadata'
        download:
          $ref: '#/components/schemas/AnalyticsMetricMetadata'
        availability:
          $ref: '#/components/schemas/AnalyticsMetricMetadata'
        retries:
          $ref: '#/components/schemas/AnalyticsMetricMetadata'
        responseTime_avg:
          $ref: '#/components/schemas/AnalyticsMetricMetadata'
        responseTime_max:
          $ref: '#/components/schemas/AnalyticsMetricMetadata'
        responseTime_median:
          $ref: '#/components/schemas/AnalyticsMetricMetadata'
        responseTime_min:
          $ref: '#/components/schemas/AnalyticsMetricMetadata'
        responseTime_p50:
          $ref: '#/components/schemas/AnalyticsMetricMetadata'
        responseTime_p90:
          $ref: '#/components/schemas/AnalyticsMetricMetadata'
        responseTime_p95:
          $ref: '#/components/schemas/AnalyticsMetricMetadata'
        responseTime_p99:
          $ref: '#/components/schemas/AnalyticsMetricMetadata'
        responseTime_stddev:
          $ref: '#/components/schemas/AnalyticsMetricMetadata'
        responseTime_sum:
          $ref: '#/components/schemas/AnalyticsMetricMetadata'
        wait_avg:
          $ref: '#/components/schemas/AnalyticsMetricMetadata'
        wait_max:
          $ref: '#/components/schemas/AnalyticsMetricMetadata'
        wait_median:
          $ref: '#/components/schemas/AnalyticsMetricMetadata'
        wait_min:
          $ref: '#/components/schemas/AnalyticsMetricMetadata'
        wait_p50:
          $ref: '#/components/schemas/AnalyticsMetricMetadata'
        wait_p90:
          $ref: '#/components/schemas/AnalyticsMetricMetadata'
        wait_p95:
          $ref: '#/components/schemas/AnalyticsMetricMetadata'
        wait_p99:
          $ref: '#/components/schemas/AnalyticsMetricMetadata'
        wait_stddev:
          $ref: '#/components/schemas/AnalyticsMetricMetadata'
        wait_sum:
          $ref: '#/components/schemas/AnalyticsMetricMetadata'
        dns_avg:
          $ref: '#/components/schemas/AnalyticsMetricMetadata'
        dns_max:
          $ref: '#/components/schemas/AnalyticsMetricMetadata'
        dns_median:
          $ref: '#/components/schemas/AnalyticsMetricMetadata'
        dns_min:
          $ref: '#/components/schemas/AnalyticsMetricMetadata'
        dns_p50:
          $ref: '#/components/schemas/AnalyticsMetricMetadata'
        dns_p90:
          $ref: '#/components/schemas/AnalyticsMetricMetadata'
        dns_p95:
          $ref: '#/components/schemas/AnalyticsMetricMetadata'
        dns_p99:
          $ref: '#/components/schemas/AnalyticsMetricMetadata'
        dns_stddev:
          $ref: '#/components/schemas/AnalyticsMetricMetadata'
        dns_sum:
          $ref: '#/components/schemas/AnalyticsMetricMetadata'
        tcp_avg:
          $ref: '#/components/schemas/AnalyticsMetricMetadata'
        tcp_max:
          $ref: '#/components/schemas/AnalyticsMetricMetadata'
        tcp_median:
          $ref: '#/components/schemas/AnalyticsMetricMetadata'
        tcp_min:
          $ref: '#/components/schemas/AnalyticsMetricMetadata'
        tcp_p50:
          $ref: '#/components/schemas/AnalyticsMetricMetadata'
        tcp_p90:
          $ref: '#/components/schemas/AnalyticsMetricMetadata'
        tcp_p95:
          $ref: '#/components/schemas/AnalyticsMetricMetadata'
        tcp_p99:
          $ref: '#/components/schemas/AnalyticsMetricMetadata'
        tcp_stddev:
          $ref: '#/components/schemas/AnalyticsMetricMetadata'
        tcp_sum:
          $ref: '#/components/schemas/AnalyticsMetricMetadata'
        firstByte_avg:
          $ref: '#/components/schemas/AnalyticsMetricMetadata'
        firstByte_max:
          $ref: '#/components/schemas/AnalyticsMetricMetadata'
        firstByte_median:
          $ref: '#/components/schemas/AnalyticsMetricMetadata'
        firstByte_min:
          $ref: '#/components/schemas/AnalyticsMetricMetadata'
        firstByte_p50:
          $ref: '#/components/schemas/AnalyticsMetricMetadata'
        firstByte_p90:
          $ref: '#/components/schemas/AnalyticsMetricMetadata'
        firstByte_p95:
          $ref: '#/components/schemas/AnalyticsMetricMetadata'
        firstByte_p99:
          $ref: '#/components/schemas/AnalyticsMetricMetadata'
        firstByte_stddev:
          $ref: '#/components/schemas/AnalyticsMetricMetadata'
        firstByte_sum:
          $ref: '#/components/schemas/AnalyticsMetricMetadata'
        download_avg:
          $ref: '#/components/schemas/AnalyticsMetricMetadata'
        download_max:
          $ref: '#/components/schemas/AnalyticsMetricMetadata'
        download_median:
          $ref: '#/components/schemas/AnalyticsMetricMetadata'
        download_min:
          $ref: '#/components/schemas/AnalyticsMetricMetadata'
        download_p50:
          $ref: '#/components/schemas/AnalyticsMetricMetadata'
        download_p90:
          $ref: '#/components/schemas/AnalyticsMetricMetadata'
        download_p95:
          $ref: '#/components/schemas/AnalyticsMetricMetadata'
        download_p99:
          $ref: '#/components/schemas/AnalyticsMetricMetadata'
        download_stddev:
          $ref: '#/components/schemas/AnalyticsMetricMetadata'
        download_sum:
          $ref: '#/components/schemas/AnalyticsMetricMetadata'
    AnalyticsSeriesData:
      anyOf:
        - type: array
          items:
            $ref: '#/components/schemas/AnalyticsSeriesRow'
        - $ref: '#/components/schemas/AnalyticsSeriesRow'
    AnalyticsMetricMetadata:
      type: object
      properties:
        unit:
          type: string
          enum:
            - milliseconds
            - score
            - count
            - percentage
        label:
          type: string
        aggregation:
          type: string
          enum:
            - avg
            - max
            - median
            - min
            - p50
            - p90
            - p95
            - p99
            - stddev
            - sum
    AnalyticsSeriesRow:
      type: object
      properties: {}
      additionalProperties: true
  securitySchemes:
    Bearer:
      type: http
      scheme: bearer
      bearerFormat: Bearer
      description: >-
        The Checkly Public API uses API keys to authenticate requests. You can
        get the API Key
        [here](https://app.checklyhq.com/settings/user/api-keys). Your API key
        is like a password: keep it secure!

        Authentication to the API is performed using the Bearer auth method in
        the Authorization header and using the account ID.

        For example, set **Authorization** header while using cURL: `curl -H
        "Authorization: Bearer [apiKey]" "X-Checkly-Account: [accountId]"` 

````