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

# List run events

> Read run events in sequence order. Pass each response’s next value as after. Continue until done is true, then inspect the simulation grades for pass or fail results.



## OpenAPI

````yaml openapi.json GET /v1/runs/{runId}/events
openapi: 3.1.0
info:
  title: Egma Platform API
  version: 1.0.0
  description: >-
    The customer-facing HTTP interface used by Egma's web app, CLI, and outside
    clients.
servers:
  - url: https://app.egma.ai
security: []
paths:
  /v1/runs/{runId}/events:
    get:
      tags:
        - Runs
      summary: List run events
      description: >-
        Read run events in sequence order. Pass each response’s next value as
        after. Continue until done is true, then inspect the simulation grades
        for pass or fail results.
      operationId: listRunEvents
      parameters:
        - name: runId
          in: path
          required: true
          schema:
            type: string
            minLength: 1
            description: Run ID returned by Create a run or List runs.
            examples:
              - run_01M0E4J0BBE1FVDVTZ1BSS5C97
        - name: projectId
          in: query
          required: false
          schema:
            type: string
            minLength: 1
            description: >-
              Project to act in. A project-scoped API key already identifies its
              project.
        - name: after
          in: query
          required: false
          schema:
            type: integer
            description: >-
              Return events with a sequence greater than this value. Use zero or
              omit it for the first page; use the previous response's next value
              to continue.
            examples:
              - 0
      responses:
        '200':
          description: The run events after the requested sequence.
          content:
            application/json:
              schema:
                type: object
                properties:
                  events:
                    type: array
                    items:
                      oneOf:
                        - type: object
                          properties:
                            seq:
                              type: integer
                            at:
                              type: string
                              format: date-time
                            kind:
                              type: string
                              enum:
                                - run
                            status:
                              type: string
                              enum:
                                - pending
                                - running
                                - completed
                                - canceled
                              description: >-
                                Simulation execution status. A completed run can
                                contain failed simulations, and grading may
                                still be in progress.
                          required:
                            - seq
                            - at
                            - kind
                            - status
                          additionalProperties: false
                        - type: object
                          properties:
                            seq:
                              type: integer
                            at:
                              type: string
                              format: date-time
                            kind:
                              type: string
                              enum:
                                - simulation
                            simulationId:
                              type: string
                              minLength: 1
                            testName:
                              anyOf:
                                - type: string
                                - type: 'null'
                            personaName:
                              anyOf:
                                - type: string
                                - type: 'null'
                            status:
                              type: string
                              enum:
                                - queued
                                - claimed
                                - running
                                - completed
                                - failed
                                - canceled
                            reason:
                              anyOf:
                                - type: string
                                  enum:
                                    - persona_concluded
                                    - agent_ended
                                    - limit_reached
                                    - agent_never_joined
                                    - not_answered
                                    - capacity
                                    - simulator_error
                                    - orphaned
                                    - dispatch_failed
                                    - provider_key_unavailable
                                - type: 'null'
                            executionFailure:
                              anyOf:
                                - type: string
                                - type: 'null'
                          required:
                            - seq
                            - at
                            - kind
                            - simulationId
                            - testName
                            - personaName
                            - status
                            - reason
                            - executionFailure
                          additionalProperties: false
                  next:
                    type: integer
                    description: >-
                      Cursor to send as after on the next request. An empty page
                      returns the same cursor.
                  caughtUp:
                    type: boolean
                    description: >-
                      This page includes all execution events available when it
                      was read. More events or grades may arrive later.
                  done:
                    type: boolean
                    description: >-
                      Execution finished, no execution events remain in the
                      backlog, and every gradable simulation has complete or
                      errored grading. Inspect individual grades to decide
                      whether the run meets your requirements.
                required:
                  - events
                  - next
                  - caughtUp
                  - done
                additionalProperties: false
                examples:
                  - events: []
                    next: 12
                    caughtUp: true
                    done: false
        '400':
          description: The request was refused.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Refusal'
        '401':
          description: The request was refused.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Refusal'
        '403':
          description: The request was refused.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Refusal'
        '404':
          description: The request was refused.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Refusal'
        '422':
          description: The request was refused.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Refusal'
        '429':
          description: The request rate limit was reached.
          headers:
            Retry-After:
              description: Seconds to wait before trying again.
              schema:
                type: integer
                minimum: 1
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Refusal'
      security:
        - bearerAuth: []
        - sessionCookie: []
components:
  schemas:
    Refusal:
      type: object
      properties:
        error:
          type: string
        message:
          type: string
        details:
          type: object
          additionalProperties: true
      required:
        - error
        - message
      additionalProperties: false
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: An Egma API key.
    sessionCookie:
      type: apiKey
      in: cookie
      name: egma.session_token
      description: >-
        The browser session cookie issued by Egma. HTTPS deployments add the
        standard __Secure- prefix.

````