> ## 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).

> [!WARNING]
>
> You are reading the docs of Galtea 5.12. [Read this page in the latest version](https://docs.galtea.ai/api-reference/analytics/get-analytics-data.md).


## OpenAPI

````yaml /v5.12/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: specificationIds
          in: query
          style: form
          explode: true
          description: >-
            Narrow results to the metrics these specifications link; combines
            with metricIds as an intersection.
          required: false
          schema:
            type: array
            items:
              type: string
        - name: from
          in: query
          description: >-
            Start date for filtering (epoch milliseconds). Ranges wider than
            1830 days (5 years) are rejected with 400.
          required: false
          schema:
            type: string
        - name: to
          in: query
          description: End date for filtering (epoch milliseconds)
          required: false
          schema:
            type: string
        - 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 reachable test cases that have at least one
                  evaluation with a reported score under that version. Reachable
                  means a case of one of the product's own datasets, or a case
                  of a platform-wide dataset the product has run; deleted cases
                  and superseded revisions count on neither side. It is 0 when
                  the product has no reachable 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
                        metrics:
                          type: array
                          description: >-
                            One entry per metric evaluated in this test-type
                            group.
                          items:
                            type: object
                            required:
                              - id
                              - name
                              - scores
                            properties:
                              id:
                                type: string
                              name:
                                type: string
                              description:
                                type: string
                                nullable: true
                              judgePrompt:
                                type: string
                                nullable: true
                              passThreshold:
                                type: number
                                description: >-
                                  The score from 0 to 1 at which an evaluation
                                  of this metric passes. `passedCount` is
                                  counted at this line.
                              scores:
                                type: array
                                description: >-
                                  Per-version score of this metric within THIS
                                  test-type group. Each item is `{ versionId,
                                  versionName, score, evaluationCount,
                                  passedCount, skippedCount }` with score on a
                                  0-100 scale.
                                items:
                                  type: object
                                  required:
                                    - versionId
                                    - versionName
                                    - score
                                  properties:
                                    versionId:
                                      type: string
                                    versionName:
                                      type: string
                                    score:
                                      type: number
                                    evaluationCount:
                                      type: integer
                                      description: >-
                                        Evaluations with a reported score behind
                                        `score`. A classifier score on an input
                                        above `CLASSIFIER_RELIABLE_INPUT_TOKENS`
                                        judge input tokens is left out, here and
                                        in `score`, unless a reviewer scored it.
                                    passedCount:
                                      type: integer
                                      description: >-
                                        Of `evaluationCount`, the evaluations
                                        whose reported score reaches its
                                        metric's pass threshold. The rest did
                                        not pass and are not sent.
                                    skippedCount:
                                      type: integer
                                      description: >-
                                        SKIPPED evaluations nobody scored, in
                                        the same scope. Not part of
                                        `evaluationCount`. Counted only next to
                                        a scored evaluation of the same metric,
                                        version and test type: a metric whose
                                        evaluations there were all skipped has
                                        no entry.
                        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,
                                  evaluationCount, passedCount, skippedCount }`
                                  with score on a 0-100 scale.
                                items:
                                  type: object
                                  required:
                                    - versionId
                                    - versionName
                                    - score
                                  properties:
                                    versionId:
                                      type: string
                                    versionName:
                                      type: string
                                    score:
                                      type: number
                                    evaluationCount:
                                      type: integer
                                      description: >-
                                        Evaluations with a reported score behind
                                        `score`. A classifier score on an input
                                        above `CLASSIFIER_RELIABLE_INPUT_TOKENS`
                                        judge input tokens is left out, here and
                                        in `score`, unless a reviewer scored it.
                                    passedCount:
                                      type: integer
                                      description: >-
                                        Of `evaluationCount`, the evaluations
                                        whose reported score reaches its
                                        metric's pass threshold. The rest did
                                        not pass and are not sent.
                                    skippedCount:
                                      type: integer
                                      description: >-
                                        SKIPPED evaluations nobody scored, in
                                        the same scope. Not part of
                                        `evaluationCount`. Counted only next to
                                        a scored evaluation of the same metric,
                                        version and test type: a metric whose
                                        evaluations there were all skipped has
                                        no entry.
                              overallScores:
                                type: array
                                description: >-
                                  Per-version canonical overall score (each item
                                  `{ versionId, versionName, score,
                                  evaluationCount, passedCount, skippedCount }`,
                                  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
                                    evaluationCount:
                                      type: integer
                                      description: >-
                                        Evaluations with a reported score behind
                                        `score`. A classifier score on an input
                                        above `CLASSIFIER_RELIABLE_INPUT_TOKENS`
                                        judge input tokens is left out, here and
                                        in `score`, unless a reviewer scored it.
                                    passedCount:
                                      type: integer
                                      description: >-
                                        Of `evaluationCount`, the evaluations
                                        whose reported score reaches its
                                        metric's pass threshold. The rest did
                                        not pass and are not sent.
                                    skippedCount:
                                      type: integer
                                      description: >-
                                        SKIPPED evaluations nobody scored, in
                                        the same scope. Not part of
                                        `evaluationCount`. Counted only next to
                                        a scored evaluation of the same metric,
                                        version and test type: a metric whose
                                        evaluations there were all skipped has
                                        no entry.
        '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-...`.

````

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