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

# List files (paginated)

> List files and photos in your organization with pagination. Note: `file.url` is an internal R2 storage key, **not** a download URL — call `GET /file/{id}/download-url` to get a signed one-hour URL. Check `saved_to_cloud: true` to confirm the field device finished uploading.



## OpenAPI

````yaml /api-reference/openapi.json get /files
openapi: 3.0.2
info:
  title: Cloneable Platform API
  version: 1.0.0
  description: >-
    REST API for the Cloneable utility field platform — manage jobs,
    configurations, poles/spans/midspans (data objects), templates, custom
    types, field photos, and exports.


    ### Authentication

    Pass your organization API key (`sk-cai-v1-...`) in the `x-api-key` HTTP
    header. Create keys in Cloneable Office under **Settings → API Keys**.


    ### Conventions

    - **Units:** All stored distances, heights, and clearances are in
    **meters**.

    - **Query encoding:** Object and array query parameters (such as `filters`
    or `sorting`) must be sent as **Unicode-safe base64 JSON** via
    `URLSearchParams`: `params.set("filters",
    btoa(JSON.stringify(value).replace(/[\u007f-\uffff]/g, (c) => "\\u" +
    c.charCodeAt(0).toString(16).padStart(4, "0"))))`.

    - **Rate limits:** 500 requests per 60 seconds per authenticated user and
    endpoint path (`429 Too Many Requests`).
  contact:
    name: Cloneable Support
    url: https://docs.cloneable.ai
    email: support@cloneable.ai
servers:
  - url: https://api.cloneable.ai
    description: Production
security:
  - apiKeyAuth: []
tags:
  - name: Authentication
    description: Verify your API key and inspect the bound organization and user context.
  - name: Jobs
    description: Create, list, update, archive, restore, and inspect utility field jobs.
  - name: Job Groups
    description: Organize jobs into named groups and folders.
  - name: Configurations
    description: >-
      Manage shared job configurations, template assignments, model snapshots,
      and revision history.
  - name: Data Objects
    description: >-
      Create, query, update, archive, and inspect poles, spans, midspans, and
      custom field records.
  - name: Templates
    description: >-
      Manage data object templates, field schemas, calculated fields, and
      auto-fill recomputation.
  - name: Custom Types
    description: >-
      Manage reusable picklists and structured option tables referenced by
      template fields.
  - name: Files & Photos
    description: >-
      Register file uploads, generate signed R2 upload/download URLs, and manage
      photo metadata.
  - name: Exports
    description: >-
      Trigger job exports, monitor export status and unsynced field photos, and
      inspect export issues.
  - name: Organization, Teams & Users
    description: >-
      Read organization metadata, effective configuration flags, teams, and
      member rosters.
paths:
  /files:
    get:
      tags:
        - Files & Photos
      summary: List files (paginated)
      description: >-
        List files and photos in your organization with pagination. Note:
        `file.url` is an internal R2 storage key, **not** a download URL — call
        `GET /file/{id}/download-url` to get a signed one-hour URL. Check
        `saved_to_cloud: true` to confirm the field device finished uploading.
      operationId: getManyFiles
      parameters:
        - name: index
          in: query
          schema:
            type: integer
        - name: size
          in: query
          schema:
            type: integer
        - name: filters
          in: query
          schema:
            type: string
            format: byte
          description: >-
            Base64-encoded JSON string (see Authentication & Conventions for
            Unicode-safe encoding). Decoded JSON schema:
            `{"type":"object","properties":{"created_at":{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string"}}},"search":{"type":"string"},"saved_to_cloud":{"type":"boolean"},"sync_to_edge":{"type":"boolean"},"type":{"type":"array","items":{"type":"string"}},"created_by":{"type":"string"},"additional_properties":{"type":"object","additionalProperties":{"nullable":true}}}}`.
          example: eyJzZWFyY2giOiJPYWsifQ==
        - name: id
          in: query
          schema:
            type: array
            items:
              type: string
        - name: latest
          in: query
          schema:
            type: string
        - name: include_count
          in: query
          schema:
            oneOf:
              - type: boolean
              - type: string
                enum:
                  - 'true'
                  - 'false'
        - name: sorting
          in: query
          schema:
            type: string
            format: byte
          description: >-
            Base64-encoded JSON string (see Authentication & Conventions for
            Unicode-safe encoding). Decoded JSON schema:
            `{"type":"object","properties":{"column":{"type":"string","enum":["created_at","updated_at","modified_at"]},"desc":{"type":"boolean"}},"required":["column","desc"]}`.
          example: eyJjb2x1bW4iOiJtb2RpZmllZF9hdCIsImRlc2MiOnRydWV9
        - name: download_url
          in: query
          schema:
            type: boolean
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  index:
                    type: integer
                  size:
                    type: integer
                  count:
                    type: integer
                  pages:
                    type: integer
                  items:
                    type: array
                    items:
                      $ref: '#/components/schemas/FileSchema'
                  archived:
                    type: array
                    items:
                      type: string
                  has_more:
                    type: boolean
                required:
                  - index
                  - size
                  - count
                  - pages
                  - items
                  - archived
        '400':
          description: Bad Request — invalid path, query, or body parameters
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                required:
                  - message
        '401':
          description: Unauthorized — missing or invalid `x-api-key` header
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '403':
          description: Forbidden — API key lacks permission for this action or is read-only
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '404':
          description: Not Found — requested resource does not exist in this organization
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                required:
                  - message
        '429':
          description: >-
            Too Many Requests — rate limit exceeded (500 requests per 60 seconds
            per authenticated user and endpoint path)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                required:
                  - message
components:
  schemas:
    FileSchema:
      type: object
      properties:
        id:
          type: string
          format: uuid
        related_object_id:
          type: string
          format: uuid
        related_workflow_id:
          type: string
          format: uuid
        type_ref_ids:
          type: array
          items:
            type: string
        company:
          type: string
          description: The company ID
        content_type:
          type: string
          description: The content type of the file
        created_at:
          type: string
          format: date-time
          description: The date the file was created
          nullable: true
        updated_at:
          type: string
          format: date-time
          nullable: true
          description: The date the file was last updated
        created_by:
          type: string
          description: The user ID of the user who created the file
        extension:
          type: string
          description: The file extension
        name:
          type: string
          description: The file name
        display_name:
          type: string
          description: The file display name
        size:
          type: number
          description: The file size in bytes
        type:
          type: string
          description: The file type
        url:
          type: string
          description: The stored file path
        saved_to_cloud:
          type: boolean
          description: Whether the file is saved to the cloud
        storage_auth_provider_name:
          type: string
        storage_provider:
          type: string
        sync_to_edge:
          type: boolean
          description: Whether the file should be synced to the edge device
        type_ref_ID:
          type: string
        additional_properties:
          type: object
          additionalProperties:
            nullable: true
        archived_original_url:
          type: string
          nullable: true
      required:
        - id
        - company
        - content_type
        - created_at
        - created_by
        - extension
        - name
        - display_name
        - size
        - type
        - url
        - saved_to_cloud
        - storage_auth_provider_name
        - storage_provider
        - sync_to_edge
        - archived_original_url
    ApiError:
      type: object
      properties:
        message:
          type: string
          description: Human-readable error description
        code:
          type: string
          description: Optional machine-readable error or support code
      required:
        - message
      example:
        message: Invalid API Key
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: >-
        Organization-scoped API key (`sk-cai-v1-...`). Create one in Cloneable
        Office under Settings → API Keys.

````

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