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

# Download resource content

> Streams an uploaded resource's content from R2. Authorized by the signed capability URL (HMAC in the query string), not bearer auth.



## OpenAPI

````yaml /api-reference/openapi.generated.json get /api/resources/{id}/content
openapi: 3.1.0
info:
  title: Empirical API
  version: 1.0.0
  description: Programmatic access to Empirical test runs, snoozes, and more.
  contact:
    name: Empirical
    url: https://empirical.run
servers:
  - url: https://api.empirical.run
security:
  - Bearer: []
tags:
  - name: Test Runs
    description: Trigger, list, and inspect end-to-end test runs.
  - name: Test Cases
    description: >-
      Browse the Playwright test cases synced from a project's repository and
      manage their tags.
  - name: Environments
    description: >-
      Named deployment targets (slug + Playwright project filters) a project's
      tests run against.
  - name: Snoozes
    description: Temporarily suppress known test failures for specific Playwright tests.
  - name: Analytics
    description: Aggregated test-run, test-count and test-case analytics for a project.
  - name: Resources
    description: >-
      Project file resources — uploads stored in R2 and external link-type files
      (e.g. Google Sheets).
  - name: Badges
    description: Public README status badge images (SVG) for project environments.
paths:
  /api/resources/{id}/content:
    get:
      tags:
        - Resources
      summary: Download resource content
      description: >-
        Streams an uploaded resource's content from R2. Authorized by the signed
        capability URL (HMAC in the query string), not bearer auth.
      operationId: downloadResourceContent
      parameters:
        - schema:
            type: integer
            minimum: 1
            description: Resource ID.
          required: true
          description: Resource ID.
          name: id
          in: path
        - schema:
            type: string
            enum:
              - r
              - w
            description: 'Capability scope: `r` (read) or `w` (write).'
          required: true
          description: 'Capability scope: `r` (read) or `w` (write).'
          name: scope
          in: query
        - schema:
            type: integer
            nullable: true
            description: Expiry as a Unix timestamp (seconds).
          required: false
          description: Expiry as a Unix timestamp (seconds).
          name: exp
          in: query
        - schema:
            type: string
            description: HMAC signature for the capability.
          required: true
          description: HMAC signature for the capability.
          name: sig
          in: query
      responses:
        '200':
          description: The resource's binary content.
          content:
            application/octet-stream:
              schema:
                type: string
                description: Binary file content.
        '400':
          description: Invalid request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Invalid scope or expired URL.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: File not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    ErrorResponse:
      type: object
      properties:
        data:
          nullable: true
          description: Always null for error responses.
        error:
          type: object
          properties:
            message:
              type: string
              description: Human-readable error message.
          required:
            - message
          description: Error details.
      required:
        - data
        - error
  securitySchemes:
    Bearer:
      type: http
      scheme: bearer

````