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

# Poll Case Analysis Progress

> Retrieve case analysis progress events via incremental polling (fallback for streaming).

Retrieve case analysis progress events via incremental polling. This endpoint also serves as a fallback when Server-Sent Events (SSE) streaming is not available. It returns only the newest events since the specified `last_event_id`, making it efficient for periodic polling.

## When to Use Polling vs Streaming

### Use Streaming (SSE) When:

* Real-time updates are critical.
* Low-latency progress monitoring is needed.
* Network supports persistent connections.

### Use Polling When:

* SSE streaming fails or is blocked by network restrictions.
* Simple periodic updates are sufficient.
* Low-latency is not a requirement.

## Best Practices

1. **Incremental Polling**: Always use `last_event_id` to avoid receiving duplicate events and reduce response size.
2. **Polling Intervals**: Use 2-5 second intervals to balance responsive updates with server load.
3. **Timeout Handling**: Implement reasonable timeouts (e.g., 10-15 minutes) for long-running analyses.


## OpenAPI

````yaml GET /cases/{id}/progress/poll
openapi: 3.1.0
info:
  title: Veridox Core API
  description: Veridox Core Platform API
  version: 0.0.1
  contact: {}
servers:
  - url: https://api.uk.veridox.ai
    description: Live (UK)
  - url: https://api.ca.veridox.ai
    description: Live (CA)
security: []
tags:
  - name: Status
    description: System status and health check endpoints
  - name: Cases
    description: Case and case file management
  - name: Organisations
    description: Organisation management
  - name: Document Requests
    description: Document request management
  - name: Search
    description: Search functionality
  - name: Admin
    description: Administrative endpoints
paths:
  /cases/{id}/progress/poll:
    get:
      tags:
        - Cases
      summary: Poll case progress updates (HTTP fallback)
      description: >-
        Returns progress events since the last event ID. Use this endpoint if
        SSE is not available in your environment. Supports Last-Event-ID pattern
        for resuming from last received event.
      operationId: CasesController_pollProgress
      parameters:
        - name: id
          required: true
          in: path
          description: Case ID
          schema:
            type: string
      responses:
        '200':
          description: List of progress events retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SsePollingResponseDto'
        '401':
          description: Unauthorized (invalid or missing authentication token)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDto'
        '429':
          description: Too many requests (rate limit exceeded)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDto'
      security:
        - api-key: []
components:
  schemas:
    SsePollingResponseDto:
      type: object
      properties:
        events:
          type: array
          items:
            type: object
            properties:
              type:
                type: string
                enum:
                  - file.analysis.progress
                  - file.analysis.completed
                  - case.analysis.completed
                  - heartbeat
                  - stream_closed
                  - server_shutdown
              id:
                type: string
                format: uuid
                pattern: >-
                  ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-7[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$
              timestamp:
                type: number
              file_id:
                type: string
                format: uuid
                pattern: >-
                  ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-7[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$
              stage:
                type: string
              progress:
                type: number
              outcome:
                type: string
                enum:
                  - success
                  - failed
              case_id:
                type: string
                format: uuid
                pattern: >-
                  ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-7[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$
              message:
                type: string
            required:
              - type
        has_more:
          type: boolean
      required:
        - events
        - has_more
    ErrorDto:
      type: object
      properties:
        error_code:
          type: string
          description: Machine-readable error code for programmatic handling
          examples:
            - request.cases.file.missing-risk-score
            - request.authentication.invalid-token
            - request.forbidden
            - request.cases.case.not-found
            - request.cases.case.already-locked
        error_message:
          type: string
          description: Human-readable error message explaining what went wrong
          example: >-
            User tried to perform an invalid operation on a file without a risk
            score.
        error_details:
          type: object
          example:
            field: email_address
      required:
        - error_code
        - error_message
  securitySchemes:
    api-key:
      type: apiKey
      in: header
      name: x-api-key

````