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

# List evaluations

> **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}
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}:
    get:
      tags:
        - Evaluations
      summary: List evaluations
      description: >-
        **Beta** — the Server-side evaluation feature is in beta. Requests from
        organizations without it enabled receive `403 Forbidden`.
      operationId: list_evaluations
      parameters:
        - name: org
          in: path
          required: true
          schema:
            type: string
            title: Org
        - name: after
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: >-
              Cursor for the next page of older evaluations. Use the token from
              a response's _links.next; omit for the newest page.
            title: After
          description: >-
            Cursor for the next page of older evaluations. Use the token from a
            response's _links.next; omit for the newest page.
        - name: before
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: >-
              Cursor for the previous page of newer evaluations. Use the token
              from a response's _links.prev. Cannot be combined with after.
            title: Before
          description: >-
            Cursor for the previous page of newer evaluations. Use the token
            from a response's _links.prev. Cannot be combined with after.
        - name: per_page
          in: query
          required: false
          schema:
            type: integer
            maximum: 100
            minimum: 1
            description: How many evaluations to return per page (max 100)
            default: 20
            title: Per Page
          description: How many evaluations to return per page (max 100)
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EvaluationListResponse'
        '400':
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/fastapi_app__errors__BadRequestResponse___locals___BadRequestResponseModel__8
          description: Bad Request
      security:
        - HTTPBearer: []
        - HTTPBasic: []
components:
  schemas:
    EvaluationListResponse:
      properties:
        data:
          items:
            $ref: '#/components/schemas/EvaluationListItemResponse'
          type: array
          title: Data
        _links:
          additionalProperties: true
          type: object
          title: Links
          description: >-
            `self`, plus `next` towards older evaluations and `prev` towards
            newer -- each present only while a page exists that way
      type: object
      required:
        - data
        - _links
      title: EvaluationListResponse
    fastapi_app__errors__BadRequestResponse___locals___BadRequestResponseModel__8:
      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: BadRequestResponseModel
      description: Invalid cursor.
      examples:
        - message: Invalid cursor.
    EvaluationListItemResponse:
      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
        context:
          $ref: '#/components/schemas/EvaluationContextResponse'
          description: >-
            What the evaluation was asked about, so a caller can tell one
            evaluation from another
      type: object
      required:
        - id
        - status
        - requested_at
        - recorded_at
        - context
      title: EvaluationListItemResponse
    EvaluationStatus:
      type: string
      enum:
        - pending
        - completed
        - failed
      title: EvaluationStatus
    EvaluationContextResponse:
      properties:
        trails:
          items:
            $ref: '#/components/schemas/TrailReferenceResponse'
          type: array
          title: Trails
          description: The trails the evaluation was asked about
      type: object
      required:
        - trails
      title: EvaluationContextResponse
      description: >-
        What the evaluation was asked about. Each kind of context target is a
        field

        of its own, so adding one leaves the existing ones where callers found
        them.
    TrailReferenceResponse:
      properties:
        flow:
          type: string
          pattern: ^[a-zA-Z0-9][a-zA-Z0-9\.\-_~]*$
          title: Flow
          description: Name of the flow the trail belongs to
        trail:
          type: string
          pattern: ^[a-zA-Z0-9][a-zA-Z0-9\-_.~]*$
          title: Trail
          description: Name of the evaluated trail
      type: object
      required:
        - flow
        - trail
      title: TrailReferenceResponse
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

````