---
title: "List a space's files"
---

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

# List a space's files

Path: CloudRaker Paperwork API › Space Files

`GET /spaces/{spaceId}/files`

Returns { files: FileDoc[] } for the space, newest first. Optional `?limit` query caps the page (default 50, max 200); there is no cursor — this is a single most-recent page, not a paginated stream. Optional `?generated=false|true` keeps only uploads or only derived files, applied before `limit`. Authorization: requires `space:read` on :spaceId (missing permission → 404, which hides the space's existence; org admins bypass).

## Authentication

- `bearerAuth`, http, header `Authorization`

## Path parameters

- `spaceId` (`listSpaceFiles.path.spaceId`; string, required)

## Query parameters

- `limit` (`listSpaceFiles.query.limit`; integer, optional) — Page size, 1–200. There is no cursor: this is one most-recent page.
  - min 1; max 200; default `50`
- `generated` (`listSpaceFiles.query.generated`; string, optional) — `false` returns only files without a `parentFileId` (uploads); `true` only files derived from another file (byproducts, run outputs). Omit for both. Applied before `limit`, so a page of uploads is never crowded out by generated files.
  - one of `"true"`, `"false"`

## Code samples

### cURL

```bash
curl --request GET \
  --url 'https://api.cloudraker.com/spaces/<spaceId>/files' \
  --header 'Authorization: Bearer <token>'
```

### TypeScript

```typescript
const url = 'https://api.cloudraker.com/spaces/<spaceId>/files';
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

fetch(url, options)
  .then(res => res.json())
  .then(json => console.log(json))
  .catch(err => console.error(err));
```

### Python

```python
import requests

url = "https://api.cloudraker.com/spaces/<spaceId>/files"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.text)
```

## Responses

### 200

Files in the space, newest first.

#### Example

```json
{
  "files": [
    {
      "id": "a1b2c3d4",
      "fileName": "invoice.pdf",
      "parentType": "space",
      "parentId": "string",
      "mimeType": "application/pdf",
      "size": 0,
      "status": "waiting",
      "processingKind": "doc-simple",
      "processingError": "string",
      "processingProgress": {
        "state": "queued",
        "pagesTotal": -9007199254740991,
        "pagesDone": -9007199254740991
      },
      "parentFileId": "string",
      "artifacts": [
        "string"
      ],
      "indexVectors": true,
      "indexOntology": true,
      "createdAt": "2019-08-24T14:15:22Z",
      "storedAt": "2019-08-24T14:15:22Z",
      "processedAt": "2019-08-24T14:15:22Z",
      "urls": {
        "file": "string",
        "processedJson": "string",
        "processedMd": "string",
        "previewPdf": "string"
      }
    }
  ]
}
```

- `files` (`listSpaceFiles.response.200.files`; array<object>, required)
  - `id` (`listSpaceFiles.response.200.files.id`; string, required)
    - example `"a1b2c3d4"`
  - `fileName` (`listSpaceFiles.response.200.files.fileName`; string, required)
    - example `"invoice.pdf"`
  - `parentType` (`listSpaceFiles.response.200.files.parentType`; string, required)
    - example `"space"`
  - `parentId` (`listSpaceFiles.response.200.files.parentId`; string, required)
  - `mimeType` (`listSpaceFiles.response.200.files.mimeType`; string, required)
    - example `"application/pdf"`
  - `size` (`listSpaceFiles.response.200.files.size`; number | null, required) — Size in bytes, null until stored.
  - `status` (`listSpaceFiles.response.200.files.status`; string, required) — Terminal values are `stored` (uploaded, no processing requested), `processed` and `failed`; `waiting` and `processing` mean keep polling.
    - one of `"waiting"`, `"stored"`, `"processing"`, `"processed"`, `"failed"`
  - `processingKind` (`listSpaceFiles.response.200.files.processingKind`; any of, required)
    - any of:
      - `string`: one of `"doc-simple"`, `"doc-ocr"`, `"doc-auto"`, `"audio-transcribe"`, `"audio-transcribe-and-diarize"`
      - `null`
  - `createdAt` (`listSpaceFiles.response.200.files.createdAt`; string, required)
    - format `date-time`; pattern `^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$`
  - `processingError` (`listSpaceFiles.response.200.files.processingError`; string, optional)
  - `processingProgress` (`listSpaceFiles.response.200.files.processingProgress`; object, optional) — Present while `status` is `processing`. `queued` means that the organization is at its concurrent parse limit and no page of this file is in parse.
    - `state` (`listSpaceFiles.response.200.files.processingProgress.state`; string, required)
      - one of `"queued"`, `"processing"`
    - `pagesTotal` (`listSpaceFiles.response.200.files.processingProgress.pagesTotal`; integer, required)
      - min -9007199254740991; max 9007199254740991
    - `pagesDone` (`listSpaceFiles.response.200.files.processingProgress.pagesDone`; integer, required)
      - min -9007199254740991; max 9007199254740991
  - `parentFileId` (`listSpaceFiles.response.200.files.parentFileId`; string, optional) — Source file this one was generated from (e.g. a redacted or signed copy).
  - `artifacts` (`listSpaceFiles.response.200.files.artifacts`; array<string>, optional) — Parsing byproducts present, e.g. `structured`, `transcript`.
  - `indexVectors` (`listSpaceFiles.response.200.files.indexVectors`; boolean, optional)
  - `indexOntology` (`listSpaceFiles.response.200.files.indexOntology`; boolean, optional)
  - `storedAt` (`listSpaceFiles.response.200.files.storedAt`; string, optional)
    - format `date-time`; pattern `^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$`
  - `processedAt` (`listSpaceFiles.response.200.files.processedAt`; string, optional)
    - format `date-time`; pattern `^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$`
  - `urls` (`listSpaceFiles.response.200.files.urls`; object, optional) — Minted download links, each valid ~1 hour. Present on single-file reads only — list responses mint none.
    - `file` (`listSpaceFiles.response.200.files.urls.file`; string, optional) — The stored original.
    - `processedJson` (`listSpaceFiles.response.200.files.urls.processedJson`; string, optional) — Structured/grounded JSON.
    - `processedMd` (`listSpaceFiles.response.200.files.urls.processedMd`; string, optional) — Extracted markdown.
    - `previewPdf` (`listSpaceFiles.response.200.files.urls.previewPdf`; string, optional)


Source: https://docs.cloudraker.com/paperwork/api/space-files/list-space-files/index.md
