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

# List task run storage items

> Returns a paginated list of storage items (files) produced by a task run.



## OpenAPI

````yaml /api-reference/v2.json get /task-runs/{run_id}/storage
openapi: 3.1.1
info:
  title: Deck API
  version: 2.0.0
servers:
  - url: https://api.deck.co/v2
    description: Production
security:
  - BearerAuth: []
tags:
  - name: Agents
  - name: Components
  - name: Credentials
  - name: Event Destinations
  - name: Events
  - name: Sessions
  - name: Sources
  - name: Storage
  - name: Task Runs
  - name: Tasks
  - name: Test
paths:
  /task-runs/{run_id}/storage:
    get:
      tags:
        - Task Runs
      summary: List task run storage items
      description: >-
        Returns a paginated list of storage items (files) produced by a task
        run.
      operationId: listTaskRunStorage
      parameters:
        - name: run_id
          in: path
          required: true
          schema:
            type: string
          description: Unique identifier for the task run (prefixed with `trun_`).
      responses:
        '200':
          description: OK
          content:
            text/plain:
              schema:
                $ref: >-
                  #/components/schemas/PaginatedResponseOfListStorageItemResponse
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/PaginatedResponseOfListStorageItemResponse
            text/json:
              schema:
                $ref: >-
                  #/components/schemas/PaginatedResponseOfListStorageItemResponse
        '400':
          description: Bad request — validation error or malformed input.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationErrorResponse'
        '401':
          description: Unauthorized.
        '403':
          description: Forbidden.
        '404':
          description: Not found — the requested resource does not exist.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '409':
          description: >-
            Conflict — the request is valid but cannot be completed in the
            current state.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: >-
            Unprocessable content — the request body is understood but contains
            invalid values.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    PaginatedResponseOfListStorageItemResponse:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/ListStorageItemResponse'
          description: Array of resource objects for the current page.
        has_more:
          type: boolean
          description: '`true` if there are more results beyond this page.'
        next_cursor:
          type:
            - 'null'
            - string
          description: >-
            Opaque cursor string to pass as the `cursor` query parameter on the
            next request. `null` when there are no more pages.
        request_id:
          type:
            - 'null'
            - string
          description: Unique identifier for the API request.
    ValidationErrorResponse:
      required:
        - errors
      type: object
      properties:
        type:
          type:
            - 'null'
            - string
          description: RFC 9110 problem type URI.
        title:
          type:
            - 'null'
            - string
          description: Short summary of the validation failure.
        status:
          type:
            - 'null'
            - integer
          description: HTTP status code.
          format: int32
        errors:
          type: object
          additionalProperties:
            type: array
            items:
              type: string
          description: Validation errors grouped by field name.
        traceId:
          type:
            - 'null'
            - string
          description: Request trace identifier.
      description: Validation error returned for malformed requests (HTTP 400).
    ErrorResponse:
      required:
        - errors
        - request_id
      type: object
      properties:
        errors:
          type: array
          items:
            $ref: '#/components/schemas/TaskRunError'
          description: One or more errors that describe what went wrong.
        request_id:
          type: string
          description: Unique identifier for this request, useful for tracing.
      description: Standard error response.
    ListStorageItemResponse:
      required:
        - id
        - object
        - file_name
        - file_type
        - file_size
        - url
        - metadata
        - extraction
        - purpose
        - result
        - created_at
      type: object
      properties:
        id:
          type: string
          description: Unique identifier for the storage item, prefixed with `stor_`.
        object:
          type: string
          description: Always `storage`.
        file_name:
          type: string
          description: Original file name as it appeared on the source.
        file_type:
          type: string
          description: MIME type (e.g. `application/pdf`, `image/png`, `text/csv`).
        file_size:
          pattern: ^-?(?:0|[1-9]\d*)$
          type:
            - integer
            - string
          format: int64
          description: File size in bytes.
        url:
          type:
            - 'null'
            - string
          description: >-
            Pre-signed URL to download the file. Time-limited; re-fetch the item
            if it expires.
        metadata:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/JsonElement'
          description: >-
            A JSON object of additional key-value details Deck records about the
            file, or `null` when there are none. Which keys appear depends on
            the file and how it was captured, so treat it as informational and
            don't depend on specific keys being present.
        extraction:
          description: >-
            Structured data extracted from the file, if extraction is enabled.
            Null if extraction failed or is not enabled.
        purpose:
          type: string
          enum:
            - attachment
            - extraction
            - output
          description: >-
            How the file relates to the run: `attachment` (a file you provided
            as task input for the agent to use), `extraction` (a file you
            provided as task input that Deck extracts data from directly,
            skipping the agent), or `output` (a file the agent captured during
            the run).
        result:
          type: string
          description: >-
            Extraction outcome: `failure` if the file's data couldn't be
            extracted, otherwise `success` (including files with no extraction).
        created_at:
          type: string
          format: date-time
          description: ISO 8601 timestamp of when the resource was created.
      description: A storage item representing a file captured during a task run.
    TaskRunError:
      required:
        - type
        - code
        - message
      type: object
      properties:
        type:
          type: string
          description: >-
            Error category (e.g. `source`, `auth`, `task`, `rate_limit`).
            Determines the class of failure.
        code:
          type: string
          description: Machine-readable error code. Use this for programmatic handling.
        message:
          type: string
          description: >-
            Human-readable explanation. Do not rely on this for logic — it may
            change.
        field:
          type:
            - 'null'
            - string
          description: The input field that caused the error, when applicable.
      description: Error details for a failed task run. Same structure as API-level errors.
    JsonElement:
      description: Arbitrary JSON value.
  securitySchemes:
    BearerAuth:
      type: http
      description: Secret key (sk_live_...)
      scheme: bearer
      bearerFormat: JWT

````