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

# List the specifications that sessions failed in a period

> The specifications of every product the caller may read that the filters keep that at least one session of the period failed, the highest share of failed sessions first, with the counts of the period of the same length just before it. A session fails a specification when a scored evaluation of a metric linked to it did not pass. Counted over the sessions that `GET /analytics/sessions-overview` counts.



## OpenAPI

````yaml https://api.galtea.ai/openapi.json get /analytics/failing-specifications
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/failing-specifications:
    get:
      tags:
        - analytics
      summary: List the specifications that sessions failed in a period
      description: >-
        The specifications of every product the caller may read that the filters
        keep that at least one session of the period failed, the highest share
        of failed sessions first, with the counts of the period of the same
        length just before it. A session fails a specification when a scored
        evaluation of a metric linked to it did not pass. Counted over the
        sessions that `GET /analytics/sessions-overview` counts.
      operationId: listFailingSpecifications
      parameters:
        - schema:
            type: string
            format: date-time
            description: Start of the period, inclusive (ISO 8601)
          required: true
          description: Start of the period, inclusive (ISO 8601)
          name: from
          in: query
        - schema:
            type: string
            format: date-time
            description: >-
              End of the period, exclusive (ISO 8601). A period that does not
              end after `from`, or is longer than 1830 days (5 years), is
              rejected with 400.
          required: true
          description: >-
            End of the period, exclusive (ISO 8601). A period that does not end
            after `from`, or is longer than 1830 days (5 years), is rejected
            with 400.
          name: to
          in: query
        - schema:
            type: boolean
            description: >-
              Count production sessions when true, development sessions when
              false.
          required: true
          description: >-
            Count production sessions when true, development sessions when
            false.
          name: isProduction
          in: query
        - schema:
            type: string
            description: >-
              The organization whose products to read. Defaults to the caller's
              own organization. Another organization reads products only for a
              caller that may read across organizations.
          required: false
          description: >-
            The organization whose products to read. Defaults to the caller's
            own organization. Another organization reads products only for a
            caller that may read across organizations.
          name: organizationId
          in: query
        - schema:
            type: string
            description: Keep the products whose name contains this (case-insensitive)
          required: false
          description: Keep the products whose name contains this (case-insensitive)
          name: name
          in: query
        - schema:
            type: array
            items:
              type: string
            description: Keep the products that carry any of these tags
          required: false
          description: Keep the products that carry any of these tags
          style: form
          explode: true
          name: tags
          in: query
        - schema:
            type: array
            items:
              type: string
            description: >-
              Keep only these products. A product outside the caller's grant is
              refused with 403; a product of another organization, or a deleted
              one, matches nothing. At most 25.
            maxItems: 25
          required: false
          description: >-
            Keep only these products. A product outside the caller's grant is
            refused with 403; a product of another organization, or a deleted
            one, matches nothing. At most 25.
          style: form
          explode: true
          name: productIds
          in: query
      responses:
        '200':
          description: The specifications that sessions failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FailingSpecifications'
        '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'
      security:
        - bearerAuth: []
components:
  schemas:
    FailingSpecifications:
      type: object
      properties:
        receivedCount:
          type: integer
          description: Sessions created in the requested period. Seed sessions never count.
        groups:
          type: object
          properties:
            critical:
              type: object
              properties:
                failedSessionCount:
                  type: integer
                  description: >-
                    Distinct sessions of the requested period that failed a
                    specification of the group: a session that failed two counts
                    once
                evaluatedSessionCount:
                  type: integer
                  description: >-
                    Distinct sessions of the requested period with a scored
                    evaluation of a metric linked to a specification of the
                    group
              required:
                - failedSessionCount
                - evaluatedSessionCount
              description: The critical specifications
            minor:
              type: object
              properties:
                failedSessionCount:
                  type: integer
                  description: >-
                    Distinct sessions of the requested period that failed a
                    specification of the group: a session that failed two counts
                    once
                evaluatedSessionCount:
                  type: integer
                  description: >-
                    Distinct sessions of the requested period with a scored
                    evaluation of a metric linked to a specification of the
                    group
              required:
                - failedSessionCount
                - evaluatedSessionCount
              description: >-
                The other specifications. A session that also failed a critical
                specification counts as failed in `critical` only, as in the
                sessions overview.
          required:
            - critical
            - minor
        specifications:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
              productId:
                type: string
              name:
                type: string
              isCritical:
                type: boolean
              current:
                type: object
                properties:
                  failedSessionCount:
                    type: integer
                    description: >-
                      Sessions where a scored evaluation of a metric linked to
                      the specification did not pass
                  evaluatedSessionCount:
                    type: integer
                    description: >-
                      Sessions with a scored evaluation of a metric linked to
                      the specification
                required:
                  - failedSessionCount
                  - evaluatedSessionCount
                description: Counts of the requested period
              previous:
                type: object
                properties:
                  failedSessionCount:
                    type: integer
                    description: >-
                      Sessions where a scored evaluation of a metric linked to
                      the specification did not pass
                  evaluatedSessionCount:
                    type: integer
                    description: >-
                      Sessions with a scored evaluation of a metric linked to
                      the specification
                required:
                  - failedSessionCount
                  - evaluatedSessionCount
                description: Counts of the period of the same length just before it
            required:
              - id
              - productId
              - name
              - isCritical
              - current
              - previous
          description: >-
            The specifications with a failed session in the requested period,
            the highest share of failed sessions first
      required:
        - receivedCount
        - groups
        - specifications
    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.