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

# Stream progress events for a durable operation.



## OpenAPI

````yaml /api-reference/openapi.json get /api/v2/operations/{operation_id}/events
openapi: 3.1.0
info:
  title: Vers API
  description: >-
    REST API for creating, checkpointing, branching, and managing Vers computers
    and projects.
  version: 2.0.0
servers:
  - url: https://api.vers.sh
    description: Vers API
security:
  - bearerAuth: []
tags:
  - name: Computers
    description: Create, inspect, execute commands in, sleep, wake, and delete computers.
  - name: Branches
    description: Branch one or more computers from a live computer, checkpoint, or tag.
  - name: Checkpoints
    description: Capture, inspect, tag, and delete whole-computer checkpoints.
  - name: Projects
    description: >-
      Organize computers into projects with private service networks and grouped
      restores.
  - name: Operations
    description: Inspect and stream status events for asynchronous durable operations.
  - name: Images
    description: >-
      Import and manage custom OCI images, system images, and registry
      artifacts.
  - name: Repositories
    description: Manage checkpoint repositories, tags, and public catalog entries.
  - name: Domains
    description: Register and manage custom domains.
  - name: Environment Variables
    description: Manage account-level environment variables applied to new computers.
  - name: Account & System
    description: Inspect API key identity, usage, and control-plane health.
paths:
  /api/v2/operations/{operation_id}/events:
    get:
      tags:
        - Operations
      summary: Stream progress events for a durable operation.
      operationId: operation_events
      parameters:
        - name: operation_id
          in: path
          description: Tenant-scoped operation identity
          required: true
          schema:
            type: string
            format: uuid
        - name: cursor
          in: query
          description: >-
            Last cursor successfully observed by the caller. Omit for the
            current snapshot.
          required: false
          schema:
            type: integer
            format: int64
            minimum: 0
        - name: follow
          in: query
          description: >-
            Keep the response open and emit later durable snapshots until
            terminal

            completion or the bounded server follow window.
          required: false
          schema:
            type: boolean
      responses:
        '200':
          description: Cursor-resumable durable operation events
          content:
            application/x-ndjson:
              schema:
                $ref: '#/components/schemas/OperationEvent'
        '400':
          description: Cursor is ahead of durable progress
        '401':
          description: Missing or invalid API key
        '404':
          description: Operation not found
components:
  schemas:
    OperationEvent:
      oneOf:
        - type: object
          required:
            - requested_cursor
            - available_cursor
            - type
          properties:
            available_cursor:
              type: integer
              format: int64
              minimum: 0
            requested_cursor:
              type: integer
              format: int64
              minimum: 0
            type:
              type: string
              enum:
                - gap
        - type: object
          required:
            - operation
            - type
          properties:
            operation:
              $ref: '#/components/schemas/Operation'
            type:
              type: string
              enum:
                - snapshot
        - type: object
          required:
            - cursor
            - terminal
            - type
          properties:
            cursor:
              type: integer
              format: int64
              minimum: 0
            terminal:
              type: boolean
            type:
              type: string
              enum:
                - end
    Operation:
      type: object
      description: Durable status returned by v2 mutation endpoints and operation lookups.
      required:
        - operation_id
        - kind
        - status
        - resource
        - cursor
        - created_at
        - updated_at
      properties:
        cleanup_operation_id:
          type:
            - string
            - 'null'
          format: uuid
          description: >-
            Server-owned cleanup operation associated with this operation. A

            create using `remove_on_workload_exit` exposes its future delete
            here

            before the workload starts, so cleanup remains observable even after

            the computer is gone.
        completed_at:
          type:
            - string
            - 'null'
          format: date-time
        created_at:
          type: string
          format: date-time
        cursor:
          type: integer
          format: int64
          description: Monotonic durable progress cursor used by the event stream.
          minimum: 0
        failure:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/OperationFailure'
        kind:
          $ref: '#/components/schemas/OperationKind'
        local_result:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/OperationResource'
              description: >-
                Checkpoint available for restore on its source node while
                publication

                is pending. Losing the source data can lose this checkpoint.
                Only a

                successful operation with `result` certifies portability in S3.
        operation_id:
          type: string
          format: uuid
          description: >-
            Caller-selected idempotency identity, scoped to the authenticated
            tenant.
        resource:
          $ref: '#/components/schemas/OperationResource'
        result:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/OperationResource'
              description: >-
                Resource published by the operation. This remains absent until
                the

                operation's atomic publication boundary has committed.
        stage:
          type:
            - string
            - 'null'
          description: >-
            Current durable stage. Intermediate stages may be skipped; the
            stream

            emits a gap event when that happens.
        status:
          $ref: '#/components/schemas/OperationStatus'
        updated_at:
          type: string
          format: date-time
    OperationFailure:
      type: object
      required:
        - code
        - message
      properties:
        code:
          type: string
        message:
          type: string
    OperationKind:
      type: string
      enum:
        - checkpoint
        - create
        - delete
        - image_import
    OperationResource:
      type: object
      required:
        - kind
        - id
      properties:
        id:
          type: string
          format: uuid
        kind:
          $ref: '#/components/schemas/OperationResourceKind'
    OperationStatus:
      type: string
      enum:
        - pending
        - succeeded
        - failed
        - quarantined
    OperationResourceKind:
      type: string
      enum:
        - checkpoint
        - computer
        - image
        - image_import
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API key
      description: 'Vers API key (`VERS_API_KEY`) sent as `Authorization: Bearer <key>`.'

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.