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

# Get analytics data

> Get analytics data for a product with optional filtering. See [Platform Overview](https://docs.galtea.ai/introduction).



## OpenAPI

````yaml https://api.galtea.ai/openapi.json get /analytics
openapi: 3.0.0
info:
  version: 1.0.0
  title: Product Management Service API
  description: API documentation for Product Management Service
  contact:
    name: Galtea AI
servers:
  - url: https://api.galtea.ai
security:
  - bearerAuth: []
tags: []
externalDocs:
  description: Galtea Platform Documentation
  url: https://docs.galtea.ai
paths:
  /analytics:
    get:
      tags:
        - analytics
      summary: Get analytics data
      description: >-
        Get analytics data for a product with optional filtering. See [Platform
        Overview](https://docs.galtea.ai/introduction).
      operationId: getAnalytics
      parameters:
        - name: productId
          in: query
          description: Product ID (required)
          required: true
          schema:
            type: string
        - name: versionIds
          in: query
          style: form
          explode: true
          description: Filter by version IDs
          required: false
          schema:
            type: array
            items:
              type: string
        - name: testIds
          in: query
          style: form
          explode: true
          description: Filter by test IDs
          required: false
          schema:
            type: array
            items:
              type: string
        - name: metricIds
          in: query
          style: form
          explode: true
          description: Filter by metric IDs
          required: false
          schema:
            type: array
            items:
              type: string
        - name: from
          in: query
          description: Start date for filtering
          required: false
          schema:
            type: string
            format: date-time
        - name: to
          in: query
          description: End date for filtering
          required: false
          schema:
            type: string
            format: date-time
        - name: languages
          in: query
          style: form
          explode: true
          description: Filter by language codes
          required: false
          schema:
            type: array
            items:
              type: string
        - name: isProduction
          in: query
          description: >-
            When set, returns only production (true) or only development (false)
            data. Omit to include both.
          required: false
          schema:
            type: boolean
      responses:
        '200':
          description: Analytics data retrieved successfully
          content:
            application/json:
              schema:
                type: object
                description: >-
                  Analytics data containing evaluation results and metrics. Each
                  entry in `averages.total` carries a per-version `coverage`
                  number (0-100, same scale as `score`): the percentage of the
                  product's non-deleted test cases that have at least one
                  completed evaluation under that version. It is 0 when the
                  product has no test cases or the version evaluated none, and
                  is computed independently of the `isProduction` filter.
                properties:
                  groups:
                    type: array
                    items:
                      type: object
                      required:
                        - type
                      properties:
                        type:
                          type: string
                        specifications:
                          type: array
                          description: >-
                            One entry per specification evaluated in this
                            test-type group.
                          items:
                            type: object
                            required:
                              - id
                              - description
                              - type
                            properties:
                              id:
                                type: string
                              description:
                                type: string
                              type:
                                type: string
                              scores:
                                type: array
                                description: >-
                                  Per-version score of this specification within
                                  THIS test-type group. Each item is `{
                                  versionId, versionName, score }` with score on
                                  a 0-100 scale.
                                items:
                                  type: object
                                  required:
                                    - versionId
                                    - versionName
                                    - score
                                  properties:
                                    versionId:
                                      type: string
                                    versionName:
                                      type: string
                                    score:
                                      type: number
                              overallScores:
                                type: array
                                description: >-
                                  Per-version canonical overall score (each item
                                  `{ versionId, versionName, score }`, 0-100):
                                  the evaluation-count-weighted average of this
                                  specification's scores across ALL test-type
                                  groups. The Overview specification ring and
                                  the low_specification_score insight flag both
                                  read this one number, so they never disagree.
                                items:
                                  type: object
                                  required:
                                    - versionId
                                    - versionName
                                    - score
                                  properties:
                                    versionId:
                                      type: string
                                    versionName:
                                      type: string
                                    score:
                                      type: number
        '400':
          description: Missing required productId
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - bearerAuth: []
components:
  schemas:
    Error:
      type: object
      properties:
        error:
          type: string
          example: Error type
        message:
          type: string
          example: Error message description
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        API key authorization. Pass your API key in the Authorization header as
        a Bearer token. Both new (`gsk_*`) and legacy (`gsk-`) API keys are
        accepted, e.g. `Authorization: Bearer gsk_...` or `Authorization: Bearer
        gsk-...`.

````