Media
Read media assets + upload user-owned media (avatars, user content).
Client uploads are scoped under <projectId>/user/<appUserId>/<ms>_<filename> in the storage path — they can't collide with admin-uploaded assets.
Source: apps/api/src/routes/client/media.ts.
Endpoints
| Method | Path | Description |
|---|---|---|
| GET | /client/media/:assetId | Fetch a single asset (public columns). |
| GET | /client/media | Paginated asset list; optional ?folder_id=. |
| POST | /client/media/upload | Register an upload; returns upload_url. |
GET /client/media/:assetId
Response 200
Errors
404 NOT_FOUND.
Try it:
GET
client auth/client/media/%7B%7BassetId%7D%7Dcurl -X GET 'https://api.amba.dev/client/media/%7B%7BassetId%7D%7D'Loading auth… Configure auth in the settings drawer (top-right) to run this request.
Curl:
GET /client/media
Query
| Param | Default | Description |
|---|---|---|
limit | 50 | |
offset | 0 | |
folder_id | — | Filter. |
Response 200
Try it:
GET
client auth/client/mediacurl -X GET 'https://api.amba.dev/client/media'Loading auth… Configure auth in the settings drawer (top-right) to run this request.
Curl:
POST /client/media/upload
Request
| Field | Type | Required |
|---|---|---|
filename | string | yes |
mime_type | string | yes |
size_bytes | number | no |
Response 201
Errors
500 CREATE_FAILED.
Try it:
POST
client auth/client/media/uploadcurl -X POST 'https://api.amba.dev/client/media/upload'Loading auth… Configure auth in the settings drawer (top-right) to run this request.
Curl: