The REST API exposes a small set of endpoints for moving files in and out of your project. They work against whichever storage backend you’ve configured in App Services → File Manager — Google Cloud Storage, Amazon S3, Azure Blob Storage, Filestack, or the built-in Archie Storage.Documentation Index
Fetch the complete documentation index at: https://archie.com/docs/llms.txt
Use this file to discover all available pages before exploring further.
| Method | Endpoint | Purpose |
|---|---|---|
POST | /api/rest/files | Upload a file |
GET | /api/rest/files | List uploaded files |
GET | /api/rest/files/{fileId} | Download a file |
DELETE | /api/rest/files/{fileId} | Delete a file |
Upload a file
Send amultipart/form-data request. Don’t set Content-Type manually — let curl (or your HTTP client) generate the boundary header.
| Form field | Required | Description |
|---|---|---|
file | Yes | The file binary. |
providerType | Yes | The storage provider to use. |
filename | Yes | Display name for the file. |
contentType | Yes | MIME type — validated against an allowlist. |
Provider types
| Value | Backend |
|---|---|
ARCHIE_STORAGE | Built-in Archie storage |
GCS | Google Cloud Storage |
S3 | Amazon S3 |
AZURE | Azure Blob Storage |
FILESTACK | Filestack |
Response — 201
url is a signed, time-bounded URL. Persist the fileId if you need a stable reference; regenerate fresh URLs at read time when needed.
Supported MIME types
The API accepts a broad allowlist by prefix:| Category | Examples |
|---|---|
| Images | All image/* (jpeg, png, gif, webp, svg+xml, bmp, tiff, avif) |
| Video | All video/* (mp4, webm, quicktime) |
| Audio | All audio/* (mpeg, wav, ogg) |
| Text | All text/* (plain, csv, html, xml) |
| Documents | application/pdf, application/rtf, MS Office, OpenXML formats |
| Archives | application/zip, application/gzip, application/x-tar |
| Data | application/json, application/xml |
| Generic | application/octet-stream |
422 Unprocessable Entity.
List files
| Parameter | Default | Max |
|---|---|---|
page | 1 | — |
pageSize | 20 | 100 |
Download a file
Content-Type, a Content-Disposition with the filename, and a 1-year Cache-Control header.
Delete a file
204 No Content on success. The file is removed from the storage provider.
Errors
| Status | Scenario |
|---|---|
| 400 | Missing required form fields. |
| 404 | File not found. |
| 413 | File exceeds the maximum upload size. |
| 422 | Unsupported MIME type. |
Permissions
File-management endpoints obey the same Role-Based Access rules as other endpoints. Configure who can upload, download, and delete in App Services. For finer-grained access (per-record file permissions), reference the file from a Data Model record and govern access via that table’s permissions.FAQ
How do I store a file alongside a record?
How do I store a file alongside a record?
Upload the file to get a
fileId, then store the fileId (and any metadata you care about) on a JSONB or text field on your record. At read time, fetch the record and re-issue the file’s signed URL through the download endpoint.Are upload URLs cached?
Are upload URLs cached?
The upload
url is a signed token with an expiry. Don’t persist it — persist the fileId and generate fresh URLs at read time. Downloads of the binary itself are cached for one year by default.What's the maximum file size?
What's the maximum file size?
The default upload limit is enforced at the gateway. Exceeding it returns
413 Payload Too Large. For very large files, use a direct-to-storage upload pattern through your provider’s SDK and store only the resulting object key in Archie.Can I switch storage providers later?
Can I switch storage providers later?
Yes — configure a new provider in File Manager and point new uploads at it. Existing files stay where they were uploaded; migrate them with a script if you want to consolidate.
What happens if I delete a file that's referenced by a record?
What happens if I delete a file that's referenced by a record?
The reference becomes a broken link. Archie doesn’t enforce referential integrity between records and files — clean up references when you delete files, or add a server-side check before deletion.