> ## Documentation Index
> Fetch the complete documentation index at: https://artie.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Query analytics data

> Queries Datadog metrics for analytics datasets such as rows synced, ingestion lag, flush time, and more. pipelineUUID is required for API keys bound to an environment. For windows of 59 minutes or longer, from and to are floored to 30 s and results are cached for up to 1 minute.



## OpenAPI

````yaml https://raw.githubusercontent.com/artie-labs/artie-api-spec/refs/heads/master/openapi.yaml get /analytics
openapi: 3.1.0
info:
  description: External API endpoints for Artie
  title: Artie API
  version: v1.0.181
servers:
  - url: https://api.artie.com
security:
  - ApiKey: []
paths:
  /analytics:
    get:
      tags:
        - Analytics
      summary: Query analytics data
      description: >-
        Queries Datadog metrics for analytics datasets such as rows synced,
        ingestion lag, flush time, and more. pipelineUUID is required for API
        keys bound to an environment. For windows of 59 minutes or longer, from
        and to are floored to 30 s and results are cached for up to 1 minute.
      operationId: analytics_query
      parameters:
        - in: query
          name: from
          required: true
          schema:
            type: string
        - in: query
          name: to
          required: true
          schema:
            type: string
        - in: query
          name: datasets[]
          required: true
          schema:
            items:
              type: string
            type: array
        - in: query
          name: pipelineUUID
          schema:
            type: string
        - in: query
          name: tables[]
          schema:
            items:
              type: string
            type: array
        - in: query
          name: backfillOptions
          schema:
            type: string
        - in: query
          name: transferMode
          schema:
            type: string
        - in: query
          name: groupBy
          schema:
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RouterAnalyticsResponse'
          description: OK
        '400':
          description: Bad Request
        '500':
          description: Internal Server Error
components:
  schemas:
    RouterAnalyticsResponse:
      properties:
        datasets:
          additionalProperties:
            $ref: '#/components/schemas/RouterQueryResult'
          type: object
      required:
        - datasets
      type: object
    RouterQueryResult:
      properties:
        data:
          $ref: '#/components/schemas/RouterAnalyticsDatasetData'
        err:
          type:
            - 'null'
            - string
        unit:
          $ref: '#/components/schemas/PayloadsAnalyticsUnit'
      required:
        - unit
        - data
        - err
      type: object
    RouterAnalyticsDatasetData:
      anyOf:
        - items:
            $ref: '#/components/schemas/PayloadsAnalyticsScalarSeries'
          type: array
        - items:
            $ref: '#/components/schemas/PayloadsAnalyticsTimeseries'
          type: array
        - type: 'null'
    PayloadsAnalyticsUnit:
      enum:
        - count
        - megabytes
        - ms
        - bytes
      type: string
    PayloadsAnalyticsScalarSeries:
      properties:
        dimensions:
          $ref: '#/components/schemas/PayloadsAnalyticsDimensions'
        granularityInterval:
          type:
            - 'null'
            - integer
        points:
          items:
            $ref: '#/components/schemas/PayloadsAnalyticsScalarIntPoint'
          type:
            - array
            - 'null'
      type: object
    PayloadsAnalyticsTimeseries:
      properties:
        dimensions:
          $ref: '#/components/schemas/PayloadsAnalyticsDimensions'
        granularityInterval:
          type:
            - 'null'
            - integer
        points:
          items:
            $ref: '#/components/schemas/PayloadsAnalyticsTimeseriesPoint'
          type:
            - array
            - 'null'
      type: object
    PayloadsAnalyticsDimensions:
      properties:
        operation:
          type: string
        pipelineUUID:
          format: uuid
          type:
            - 'null'
            - string
        reason:
          type: string
        slot:
          type: string
        table:
          type: string
        warehouseName:
          type: string
        warehouseSize:
          type: string
      type: object
    PayloadsAnalyticsScalarIntPoint:
      properties:
        value:
          format: int64
          type: integer
      type: object
    PayloadsAnalyticsTimeseriesPoint:
      properties:
        time:
          format: int64
          type: integer
        value:
          format: double
          type: number
      type: object
  securitySchemes:
    ApiKey:
      description: API key passed as a Bearer token in the Authorization header.
      scheme: bearer
      type: http

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.