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

# List device tasks

> List one device's tasks, newest first, with keyset pagination. The device is resolved (and its
Space checked) first, so a foreign-org device id is a 404 before any task is read.



## OpenAPI

````yaml /schemas/operator.json get /v1/devices/{id}/tasks
openapi: 3.1.0
info:
  title: Omegas Operator API
  version: 0.1.0
  description: >-
    The public /v1 machine surface: cloud browser devices, tasks, live-view
    sessions, escalations, usage, webhook endpoints, and the audit trail.
    Generated from the same OpenAPI document the Rust API is checked against.
servers:
  - url: https://api.omegas.dev
    description: Production
security: []
paths:
  /v1/devices/{id}/tasks:
    get:
      tags:
        - Endpoints
      summary: List device tasks
      description: >-
        List one device's tasks, newest first, with keyset pagination. The
        device is resolved (and its

        Space checked) first, so a foreign-org device id is a 404 before any
        task is read.
      operationId: list_device_tasks
      parameters:
        - name: id
          in: path
          description: Device id (`dev_<uuid>`)
          required: true
          schema:
            type: string
        - name: cursor
          in: query
          description: Opaque cursor from a previous page's `next_cursor`.
          required: false
          schema:
            type:
              - string
              - 'null'
        - name: limit
          in: query
          description: Page size (default 20, max 100).
          required: false
          schema:
            type:
              - integer
              - 'null'
            format: int64
      responses:
        '200':
          description: A page of tasks
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TaskListResponse'
        '400':
          description: invalid cursor
        '401':
          description: invalid_api_key
        '403':
          description: insufficient_scope or product_not_entitled
        '404':
          description: device_not_found
        '429':
          description: rate_limited
      security:
        - bearer_operator: []
components:
  schemas:
    TaskListResponse:
      type: object
      description: >-
        A page of tasks with the cursor for the next page (`null` on the last
        page).
      required:
        - data
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/Task'
        next_cursor:
          type:
            - string
            - 'null'
    Task:
      type: object
      description: A task as returned on the `/v1` surface.
      required:
        - id
        - object
        - device_id
        - status
        - prompt
        - created_at
      properties:
        created_at:
          type: string
        device_id:
          type: string
          description: '`dev_<uuid>` of the owning device.'
        finished_at:
          type:
            - string
            - 'null'
        id:
          type: string
          description: '`task_<uuid>`.'
        object:
          type: string
          description: Discriminator for polymorphic SDK decoders. Always `"task"`.
        prompt:
          type: string
        result:
          description: >-
            Why the task ended, as recorded when it was finalized: `{"error": …,
            "detail": …}` on a

            failure, the agent's answer on a success. `null` while still
            running.


            This is on the wire because the alternative was observed and is
            indefensible: a task that

            reports `status: "failed"` and nothing else. The reason already
            existed in the record —

            `finalize_terminal` writes it — and withholding it from the caller
            left them with a failure

            they could not act on, or even describe. Details here are fixed,
            non-leaking strings; the

            underlying transport error is logged and never persisted.
        status:
          type: string
  securitySchemes:
    bearer_operator:
      type: http
      scheme: bearer
      bearerFormat: Opaque

````