GET /api/v1/media
Lists the school's media library, newest first. A hosted video still encoding
is re-read from the video host on every call: listing is how its status
moves from processing to ready.
| Role in the organization | This endpoint |
|---|---|
OWNER | Allowed |
ADMIN | Allowed |
MEMBER | Refused — 403 |
| Requirement | Rule for this endpoint |
|---|---|
| Business role | None — the permission is that of the lessons |
| Resource scope | The key's organization |
| Participation | None |
| Resource state | None |
| Parameter | Type | Required | Description |
|---|---|---|---|
kind | string | no | video, image or document; any other value is ignored |
liveOnly | boolean | no | true hides archived media |
curl "$COHORTE_API_BASE_URL/api/v1/media?kind=video" \
-H "x-api-key: $COHORTE_API_KEY"200 OK — the list, possibly empty.401 Unauthorized — missing, unknown or expired key.403 Forbidden — the bearer is not OWNER or ADMIN.| Field | Type | Description |
|---|---|---|
data[].id | UUID | Media id — the mediaId a lesson resource cites |
data[].kind | string | video, image or document |
data[].provider | string | bunny, vimeo, youtube, storage or url |
data[].source | string | upload or link |
data[].url | string | Address the player or the image uses |
data[].title | string | Title |
data[].status | string | processing, ready or failed |
data[].progress | integer | Encoding progress 0–100 while processing, else null |
data[].durationSeconds | integer | Video length once encoded, else null |
data[].mimeType | string | MIME type when known |
data[].sizeBytes | integer | Size when known |
data[].createdAt | string | ISO 8601 |
data[].archived | boolean | true once archived from the screens |
data[].usage[] | array | kind (lesson or course), id, title of each place using it |
{
"success": true,
"data": [
{
"id": "8c9d0e1f-2a3b-4c4d-8e5f-6a7b8c9d0e1f",
"kind": "video",
"provider": "bunny",
"source": "upload",
"url": "https://iframe.mediadelivery.net/embed/123456/0f1e2d3c-4b5a-6978-8a9b-0c1d2e3f4a5b",
"title": "Welcome",
"status": "processing",
"progress": 42,
"durationSeconds": null,
"mimeType": "video/mp4",
"sizeBytes": 184320000,
"createdAt": "2026-10-01T08:30:00.000Z",
"archived": false,
"usage": [{"kind": "lesson", "id": "2b3c4d5e-6f7a-4b8c-9d0e-1f2a3b4c5d6e", "title": "Welcome"}]
}
],
"correlationId": "c0ffee00-1111-4222-8333-444455556666"
}status becomes ready when encoding ends, failed if it does not.