Media
About 598 wordsAbout 2 min
Generated from
docs/.vuepress/openapi.json. Refresh withnpm run gen:api. Back to overview.
GET /api/v1/media — Index MediaArchive
Tags: Media
Query parameters
| Name | Type | Required | Description |
|---|---|---|---|
principal_id | array | no | Repeatable principal id to scope the listing by. Intersected with the caller’s visible principals server-side; out-of-scope ids are silently dropped. Used by the Media Archive plugin’s ALL / My Media / Group X chip row. Use the principal_id[]=… array-bracket form so repeated keys are preserved through PHP parse_str. |
folder_id | string | no | Scope the listing to one folder. An exact match: a parent folder does not include the assets filed in its subfolders. The folder is intersected with the principal scope, so a folder owned outside it yields no rows. The array-bracket form folder_id[]=… is accepted; only the first value is honoured. |
unfiled | boolean | no | Scope the listing to the assets filed in no folder. Ignored when folder_id is present — the folder filter is the more specific of the two. |
kind | string | no | Scope the listing by the asset’s kind. The mark is advisory — a value outside the vocabulary is dropped and the listing stays unfiltered. |
Responses
| Status | Description |
|---|---|
default | JSON envelope: {data: ...} on success, {error: {code, message}} on error. |
POST /api/v1/media — Store MediaUpload
Tags: Media
Responses
| Status | Description |
|---|---|
default | JSON envelope: {data: ...} on success, {error: {code, message}} on error. |
POST /api/v1/media/{id}/derivatives — Create MediaDerivative
Tags: Media
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
id | string | yes |
Responses
| Status | Description |
|---|---|
default | JSON envelope: {data: ...} on success, {error: {code, message}} on error. |
GET /api/v1/media/{id}/derivatives/options — Index MediaDerivativeOptions
Tags: Media
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
id | string | yes |
Responses
| Status | Description |
|---|---|
default | JSON envelope: {data: ...} on success, {error: {code, message}} on error. |
GET /api/v1/media/{id}/embed — Fetch a media asset as live, embeddable content
Tags: Media
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
id | string | yes |
Responses
| Status | Description |
|---|---|
200 | The asset bytes, sandboxed. The CSP header carries the operator’s script policy. |
404 | No such asset, not readable by the caller, or not a format the operator permitted. |
POST /api/v1/media/{id}/keep — Keep KeepMedia
Tags: Media
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
id | string | yes |
Responses
| Status | Description |
|---|---|
default | JSON envelope: {data: ...} on success, {error: {code, message}} on error. |
GET /api/v1/media/allowed-types — Index MediaAllowedTypes
Tags: Media
Responses
| Status | Description |
|---|---|
default | JSON envelope: {data: ...} on success, {error: {code, message}} on error. |
GET /api/v1/media/folders — Index MediaFolder
Tags: Media
Query parameters
| Name | Type | Required | Description |
|---|---|---|---|
principal_id | integer | no | The principal whose folders are listed. Must be one of the caller’s visible principals; anything else is a 404. The array-bracket form principal_id[]=… is accepted; only the first value is honoured. |
Responses
| Status | Description |
|---|---|
default | JSON envelope: {data: ...} on success, {error: {code, message}} on error. |
POST /api/v1/media/folders — Store MediaFolder
Tags: Media
Responses
| Status | Description |
|---|---|
default | JSON envelope: {data: ...} on success, {error: {code, message}} on error. |
PATCH /api/v1/media/folders/{id} — Update MediaFolder
Tags: Media
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
id | string | yes |
Responses
| Status | Description |
|---|---|
default | JSON envelope: {data: ...} on success, {error: {code, message}} on error. |
DELETE /api/v1/media/folders/{id} — Destroy MediaFolder
Tags: Media
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
id | string | yes |
Responses
| Status | Description |
|---|---|
default | JSON envelope: {data: ...} on success, {error: {code, message}} on error. |
POST /api/v1/media/resolve — Resolve MediaResolve
Tags: Media
Request body
application/json — required
| Field | Type | Required | Description |
|---|---|---|---|
ids | array of string (uuid) | yes | Media Archive UUIDs. Up to 64 per request. At most 64 items. |
Responses
| Status | Description |
|---|---|
default | JSON envelope: {data: ...} on success, {error: {code, message}} on error. |