> ## 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 the test-case coverage per version for a product

> The test cases each version was evaluated against, per test type and over every test type, with the same filters as `GET /analytics`. Needs `analytics.readCoverage` on the product, on top of `product.read` and `analytics.read`, else 403; 404 for a missing product.



## OpenAPI

````yaml /openapi.json get /analytics/coverage
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/coverage:
    get:
      tags:
        - analytics
      summary: Get the test-case coverage per version for a product
      description: >-
        The test cases each version was evaluated against, per test type and
        over every test type, with the same filters as `GET /analytics`. Needs
        `analytics.readCoverage` on the product, on top of `product.read` and
        `analytics.read`, else 403; 404 for a missing product.
      operationId: getAnalyticsCoverage
      parameters:
        - schema:
            type: string
            minLength: 1
            description: The product to read
          required: true
          description: The product to read
          name: productId
          in: query
        - schema:
            type: array
            items:
              type: string
            description: Filter by version IDs
          required: false
          description: Filter by version IDs
          style: form
          explode: true
          name: versionIds
          in: query
        - schema:
            type: array
            items:
              type: string
            description: Filter by test IDs
          required: false
          description: Filter by test IDs
          style: form
          explode: true
          name: testIds
          in: query
        - schema:
            type: array
            items:
              type: string
            description: Filter by metric IDs
          required: false
          description: Filter by metric IDs
          style: form
          explode: true
          name: metricIds
          in: query
        - schema:
            type: array
            items:
              type: string
            description: >-
              Narrow results to the metrics these specifications link; combines
              with metricIds as an intersection.
          required: false
          description: >-
            Narrow results to the metrics these specifications link; combines
            with metricIds as an intersection.
          style: form
          explode: true
          name: specificationIds
          in: query
        - schema:
            type: array
            items:
              type: string
            description: Filter by language codes
          required: false
          description: Filter by language codes
          style: form
          explode: true
          name: languages
          in: query
        - schema:
            type: string
            description: >-
              Start date for filtering (epoch milliseconds). Ranges wider than
              1830 days (5 years) are rejected with 400.
          required: false
          description: >-
            Start date for filtering (epoch milliseconds). Ranges wider than
            1830 days (5 years) are rejected with 400.
          name: from
          in: query
        - schema:
            type: string
            description: End date for filtering (epoch milliseconds)
          required: false
          description: End date for filtering (epoch milliseconds)
          name: to
          in: query
        - schema:
            type: boolean
            description: >-
              When set, returns only production (true) or only development
              (false) data. Omit to include both.
          required: false
          description: >-
            When set, returns only production (true) or only development (false)
            data. Omit to include both.
          name: isProduction
          in: query
      responses:
        '200':
          description: The coverage of the product
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AnalyticsCoverage'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - bearerAuth: []
components:
  schemas:
    AnalyticsCoverage:
      type: object
      properties:
        groups:
          type: array
          items:
            type: object
            properties:
              type:
                type: string
              versions:
                type: array
                items:
                  $ref: '#/components/schemas/AnalyticsVersionCoverage'
              sharedCoverage:
                $ref: '#/components/schemas/AnalyticsSharedCoverageSummary'
            required:
              - type
              - versions
          description: >-
            Per test type, as the coverage fields of `averages.groups` on `GET
            /analytics`. `sharedCoverage` is absent for a group with no
            test-case coverage, such as PRODUCTION.
        total:
          type: array
          items:
            $ref: '#/components/schemas/AnalyticsVersionCoverage'
          description: >-
            Over every test type, as the coverage fields of `averages.total` on
            `GET /analytics`
        sharedCoverage:
          allOf:
            - $ref: '#/components/schemas/AnalyticsSharedCoverageSummary'
            - description: >-
                Over every test type, as `averages.sharedCoverage` on `GET
                /analytics`
      required:
        - groups
        - total
        - sharedCoverage
    Error:
      type: object
      properties:
        error:
          type: string
          example: Error type
        message:
          type: string
          example: Error message description
    AnalyticsVersionCoverage:
      type: object
      properties:
        versionId:
          type: string
        versionName:
          type: string
        coverage:
          type: number
          description: >-
            The share, 0 to 100, of the product reachable test cases this
            version has a scored evaluation for, all time and unfiltered. Only
            on `total`.
        usedTestCaseCount:
          type: integer
          description: >-
            The distinct test cases this version was evaluated against under the
            filters. Absent on a group with no `sharedCoverage`.
        sharedCoverage:
          type: number
          description: >-
            `usedTestCaseCount` as a share, 0 to 100, of the `used` test cases.
            Absent with `usedTestCaseCount`.
      required:
        - versionId
        - versionName
    AnalyticsSharedCoverageSummary:
      type: object
      properties:
        total:
          type: integer
          description: The candidate test cases under the filters
        used:
          type: integer
          description: The test cases at least one listed version was evaluated against
        ignored:
          type: integer
          description: '`total` minus `used`'
      required:
        - total
        - used
        - ignored
  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.