> ## Documentation Index
> Fetch the complete documentation index at: https://docs.kosli.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Get an evaluation

> **Beta** — the Server-side evaluation feature is in beta. Requests from organizations without it enabled receive `403 Forbidden`.



## OpenAPI

````yaml https://app.kosli.com/api/v2/openapi.json get /evaluations/{org}/{evaluation_id}
openapi: 3.1.0
info:
  title: Kosli API
  summary: The API for communicating with Kosli
  description: >

    # Authentication 


    When making requests against Kosli API, you can authenticate your requests
    using a bearer token. 

    Set the bearer token in the request Authorization header to a valid API
    key. 

    API Keys can be personal or for service accounts. Check the [service
    accounts
    documentation](https://docs.kosli.com/getting_started/service-accounts/) for
    details. 


    ## Curl example


    ```shell

    curl -H "Authorization: Bearer <<your-api-key>>"
    https://app.kosli.com/api/v2/environments/<<your-org-name>>

    ```
  version: '2.0'
servers:
  - url: https://app.kosli.com/api/v2
    description: EU
  - url: https://app.us.kosli.com/api/v2
    description: US
security:
  - HTTPBearer: []
paths:
  /evaluations/{org}/{evaluation_id}:
    get:
      tags:
        - Evaluations
      summary: Get an evaluation
      description: >-
        **Beta** — the Server-side evaluation feature is in beta. Requests from
        organizations without it enabled receive `403 Forbidden`.
      operationId: get_evaluation
      parameters:
        - name: evaluation_id
          in: path
          required: true
          schema:
            type: string
            title: Evaluation Id
        - name: org
          in: path
          required: true
          schema:
            type: string
            title: Org
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EvaluationResponse'
        '403':
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/fastapi_app__errors__ForbiddenResponse___locals___ForbiddenResponseModel__17
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/fastapi_app__errors__NotFoundResponse___locals___NotFoundResponseModel__54
          description: Not Found
      security:
        - HTTPBearer: []
        - HTTPBasic: []
components:
  schemas:
    EvaluationResponse:
      properties:
        id:
          type: string
          title: Id
          description: Server-minted id of the evaluation
        status:
          $ref: '#/components/schemas/EvaluationStatus'
          description: >-
            Whether the evaluation has run, and if so whether it recorded a
            result or an error
        requested_at:
          type: number
          title: Requested At
          description: When the evaluation was asked for
        recorded_at:
          type: number
          title: Recorded At
          description: >-
            The instant on the recorded-time axis that every trail in the
            context resolves at
        result:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Result
          description: The policy's output, present only when `completed`
        error:
          anyOf:
            - $ref: '#/components/schemas/EvaluationErrorResponse'
            - type: 'null'
          description: Why the evaluation failed, present only when `failed`
      type: object
      required:
        - id
        - status
        - requested_at
        - recorded_at
      title: EvaluationResponse
    fastapi_app__errors__ForbiddenResponse___locals___ForbiddenResponseModel__17:
      properties:
        message:
          type: string
          title: Message
          description: Error message
        errors:
          anyOf:
            - additionalProperties:
                type: string
              type: object
            - type: 'null'
          title: Errors
          description: Validation errors by field
      type: object
      required:
        - message
      title: ForbiddenResponseModel
      examples:
        - message: You don't have permission to access this resource
    fastapi_app__errors__NotFoundResponse___locals___NotFoundResponseModel__54:
      properties:
        message:
          type: string
          title: Message
          description: Error message
        errors:
          anyOf:
            - additionalProperties:
                type: string
              type: object
            - type: 'null'
          title: Errors
          description: Validation errors by field
      type: object
      required:
        - message
      title: NotFoundResponseModel
      description: Evaluation not found
      examples:
        - message: Evaluation not found
    EvaluationStatus:
      type: string
      enum:
        - pending
        - completed
        - failed
      title: EvaluationStatus
    EvaluationErrorResponse:
      properties:
        kind:
          type: string
          title: Kind
          description: >-
            Classification of the failure, distinguishing a broken policy from a
            fault on our side
        message:
          type: string
          title: Message
          description: Human-readable detail of the failure
          default: ''
      type: object
      required:
        - kind
      title: EvaluationErrorResponse
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

````