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

# Evaluate a revision on the annotated cases of its metric

> Score every annotated case of the revision's metric that the revision has not scored yet, in the products where the caller may read and create evaluations and create runs. A case whose evaluation by this revision succeeded or is pending is left alone, so a repeated call charges nothing twice, and a call made while another one is still running answers 409. Each evaluation costs credits as any evaluation does. Opens one run per product; follow the evaluations of `runIds` to see the scores arrive. The id is a revision id. A metric id answers 404.



## OpenAPI

````yaml /openapi.json post /v2/revisions/{id}/evaluate-annotated-cases
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:
  /v2/revisions/{id}/evaluate-annotated-cases:
    post:
      tags:
        - revisions
      summary: Evaluate a revision on the annotated cases of its metric
      description: >-
        Score every annotated case of the revision's metric that the revision
        has not scored yet, in the products where the caller may read and create
        evaluations and create runs. A case whose evaluation by this revision
        succeeded or is pending is left alone, so a repeated call charges
        nothing twice, and a call made while another one is still running
        answers 409. Each evaluation costs credits as any evaluation does. Opens
        one run per product; follow the evaluations of `runIds` to see the
        scores arrive. The id is a revision id. A metric id answers 404.
      operationId: evaluateRevisionOnAnnotatedCases
      parameters:
        - schema:
            type: string
            minLength: 1
            description: >-
              Revision ID. A metric ID answers 404; read its active revision
              under /v2/metrics.
            example: revision_123
          required: true
          description: >-
            Revision ID. A metric ID answers 404; read its active revision under
            /v2/metrics.
          name: id
          in: path
      responses:
        '202':
          description: The evaluations were admitted
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RevisionAnnotatedCasesEvaluation'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: >-
            The revision's metric is outside the products the caller's user
            groups grant, or the caller may create evaluations in no product
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Revision not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '409':
          description: >-
            Another call is already evaluating the annotated cases of this
            revision
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - bearerAuth: []
components:
  schemas:
    RevisionAnnotatedCasesEvaluation:
      type: object
      properties:
        revisionId:
          type: string
          example: revision_123
          description: The revision the run scores with.
        scheduled:
          type: integer
          example: 11
          description: Evaluations admitted.
        skipped:
          type: integer
          example: 1
          description: Cases that were not scored; `errors` says why.
        errors:
          type: array
          items:
            type: string
        runIds:
          type: array
          items:
            type: string
          description: The runs this call opened, one per product.
      required:
        - revisionId
        - scheduled
        - skipped
        - errors
        - runIds
    Error:
      type: object
      properties:
        error:
          type: string
          example: NotFound
          description: >-
            The HTTP status name in PascalCase, such as `BadRequest` or
            `NotFound`.
        message:
          type: string
          example: Product not found
          description: What went wrong, for a person.
      required:
        - error
        - message
  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.