> ## Documentation Index
> Fetch the complete documentation index at: https://azure-foundry.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Post evals runs 1

> Cancel a specific evaluation run by its ID.

NOTE: This Azure OpenAI API is in preview and subject to change.



## OpenAPI

````yaml api-reference/openai-v1.yaml post /evals/{eval_id}/runs/{run_id}
openapi: 3.0.0
info:
  title: Azure AI Foundry Models Service
  license:
    name: MIT
    url: https://github.com/openai/openai-openapi/blob/master/LICENSE
  version: v1
servers:
  - url: '{endpoint}/openai/v1'
    description: Azure AI Foundry Models APIs
    variables:
      endpoint:
        default: ''
        description: >-
          A supported Azure AI Foundry Models APIs endpoint, including protocol
          and hostname.

          For example:

          https://westus.api.cognitive.microsoft.com).
security:
  - ApiKeyAuth: []
  - ApiKeyAuth_: []
  - OAuth2Auth:
      - https://cognitiveservices.azure.com/.default
tags:
  - name: Chat
  - name: Embeddings
  - name: Evals
  - name: Files
  - name: Fine-tuning
  - name: Models
  - name: Responses
  - name: Vector Stores
paths:
  /evals/{eval_id}/runs/{run_id}:
    post:
      tags:
        - Evals
      description: |-
        Cancel a specific evaluation run by its ID.

        NOTE: This Azure OpenAI API is in preview and subject to change.
      operationId: cancelEvalRun
      parameters:
        - name: api-version
          in: query
          required: false
          description: >-
            The explicit Azure AI Foundry Models API version to use for this
            request.

            `v1` if not otherwise specified.
          schema:
            $ref: '#/components/schemas/AzureAIFoundryModelsApiVersion'
            default: v1
        - name: aoai-evals
          in: header
          required: true
          description: >-
            Enables access to AOAI Evals, a preview feature.

            This feature requires the 'aoai-evals' header to be set to
            'preview'.
          schema:
            type: string
            enum:
              - preview
        - name: eval_id
          in: path
          required: true
          schema:
            type: string
        - name: run_id
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: The request has succeeded.
          headers:
            apim-request-id:
              required: false
              description: A request ID used for troubleshooting purposes.
              schema:
                type: string
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OpenAI.EvalRun'
        default:
          description: An unexpected error response.
          headers:
            apim-request-id:
              required: false
              description: A request ID used for troubleshooting purposes.
              schema:
                type: string
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AzureErrorResponse'
components:
  schemas:
    AzureAIFoundryModelsApiVersion:
      type: string
      enum:
        - v1
        - preview
    OpenAI.EvalRun:
      type: object
      required:
        - object
        - id
        - eval_id
        - status
        - model
        - name
        - created_at
        - report_url
        - result_counts
        - per_model_usage
        - per_testing_criteria_results
        - data_source
        - metadata
        - error
      properties:
        object:
          type: string
          enum:
            - eval.run
          description: The type of the object. Always "eval.run".
          default: eval.run
        id:
          type: string
          description: Unique identifier for the evaluation run.
        eval_id:
          type: string
          description: The identifier of the associated evaluation.
        status:
          type: string
          description: The status of the evaluation run.
        model:
          type: string
          description: The model that is evaluated, if applicable.
        name:
          type: string
          description: The name of the evaluation run.
        created_at:
          type: integer
          format: unixtime
          description: Unix timestamp (in seconds) when the evaluation run was created.
        report_url:
          type: string
          description: The URL to the rendered evaluation run report on the UI dashboard.
        result_counts:
          type: object
          properties:
            total:
              type: integer
              format: int32
              description: Total number of executed output items.
            errored:
              type: integer
              format: int32
              description: Number of output items that resulted in an error.
            failed:
              type: integer
              format: int32
              description: Number of output items that failed to pass the evaluation.
            passed:
              type: integer
              format: int32
              description: Number of output items that passed the evaluation.
          required:
            - total
            - errored
            - failed
            - passed
          description: Counters summarizing the outcomes of the evaluation run.
        per_model_usage:
          type: array
          items:
            type: object
            properties:
              model_name:
                type: string
                description: The name of the model.
              invocation_count:
                type: integer
                format: int32
                description: The number of invocations.
              prompt_tokens:
                type: integer
                format: int32
                description: The number of prompt tokens used.
              completion_tokens:
                type: integer
                format: int32
                description: The number of completion tokens generated.
              total_tokens:
                type: integer
                format: int32
                description: The total number of tokens used.
              cached_tokens:
                type: integer
                format: int32
                description: The number of tokens retrieved from cache.
            required:
              - model_name
              - invocation_count
              - prompt_tokens
              - completion_tokens
              - total_tokens
              - cached_tokens
          description: Usage statistics for each model during the evaluation run.
        per_testing_criteria_results:
          type: array
          items:
            type: object
            properties:
              testing_criteria:
                type: string
                description: A description of the testing criteria.
              passed:
                type: integer
                format: int32
                description: Number of tests passed for this criteria.
              failed:
                type: integer
                format: int32
                description: Number of tests failed for this criteria.
            required:
              - testing_criteria
              - passed
              - failed
          description: Results per testing criteria applied during the evaluation run.
        data_source:
          allOf:
            - $ref: '#/components/schemas/OpenAI.EvalRunDataSourceResource'
          description: Information about the run's data source.
        metadata:
          type: object
          additionalProperties:
            type: string
          nullable: true
          description: >-
            Set of 16 key-value pairs that can be attached to an object. This
            can be

            useful for storing additional information about the object in a
            structured

            format, and querying for objects via API or the dashboard.


            Keys are strings with a maximum length of 64 characters. Values are
            strings

            with a maximum length of 512 characters.
          x-oaiTypeLabel: map
        error:
          $ref: '#/components/schemas/OpenAI.EvalApiError'
      description: A schema representing an evaluation run.
    AzureErrorResponse:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              description: The distinct, machine-generated identifier for the error.
            message:
              type: string
              description: A human-readable message associated with the error.
            param:
              type: string
              description: >-
                If applicable, the request input parameter associated with the
                error
            type:
              type: string
              enum:
                - error
              description: The object type, always 'error.'
            inner_error: {}
          description: The error details.
    OpenAI.EvalRunDataSourceResource:
      type: object
      required:
        - type
      properties:
        type:
          $ref: '#/components/schemas/OpenAI.EvalRunDataSourceType'
    OpenAI.EvalApiError:
      type: object
      required:
        - code
        - message
      properties:
        code:
          type: string
          description: The error code.
        message:
          type: string
          description: The error message.
      description: An object representing an error response from the Eval API.
    OpenAI.EvalRunDataSourceType:
      type: string
      enum:
        - jsonl
        - completions
        - responses
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: api-key
    ApiKeyAuth_:
      type: apiKey
      in: header
      name: authorization
    OAuth2Auth:
      type: oauth2
      flows:
        implicit:
          authorizationUrl: https://login.microsoftonline.com/common/oauth2/v2.0/authorize
          scopes:
            https://cognitiveservices.azure.com/.default: ''

````