Media
Get all categories for an account
GET
/api/media/category
This is an API to return all categories for the current account. This will return categories on a root level
Headers
Name
Value
Content-Type
application/json
Authorization
<token>
Response
[
{
"id": "e30547b1-3373-4620-8846-ec6e8682e20f",
"account_id": "7d97c8ba-65b9-44c8-96f9-cbb2ac7889ff",
"user_id": null,
"name": "Matematik teori",
"description": "",
"icon": "tv",
"created_by": "ba68ce50-86e7-4fb2-bf25-01d5ca19fbb6",
"created_at": "2024-03-18T18:38:46.566Z",
"is_public": false,
"read_access": [
"7d97c8ba-65b9-44c8-96f9-cbb2ac7889ff"
],
"is_package": false,
"package_visible_to": [],
"access_control_read_access": [
"7d97c8ba-65b9-44c8-96f9-cbb2ac7889ff"
]
},
{
"id": "7fceef6c-8e43-4e0c-b902-08caca11eb80",
"account_id": "7d97c8ba-65b9-44c8-96f9-cbb2ac7889ff",
"name": "Pekebok for voksne",
"description": "",
"icon": "communication",
"created_by": "ba52se50-86e7-4fb2-bf25-01d5ca19fbb6",
"created_at": "2024-01-04T09:39:19.156Z",
"is_public": false,
"read_access": [
"7d97c8ba-65b9-44c8-96f9-cbb2ac7889ff"
],
"access_control_read_access": [
"7d97c8ba-65b9-44c8-96f9-cbb2ac7889ff"
]
},
]
Get category by ID
GET
/api/media/category/:id
This API returns the category for provided ID
Headers
Name
Value
Content-Type
application/json
Authorization
<token>
Params
Name
Type
Description
id
UUID
Category Id
Response
{
"id": "e30547b1-3373-4620-8846-ec6e8682e20f",
"account_id": "7d97c8ba-65b9-44c8-96f9-cbb2ac7889ff",
"user_id": null,
"name": "Matematik teori",
"description": "",
"icon": "tv",
"created_by": "ba68ce50-86e7-4fb2-bf25-01d5ca19fbb6",
"created_at": "2024-03-18T18:38:46.566Z",
"is_public": false,
"read_access": [
"7d97c8ba-65b9-44c8-96f9-cbb2ac7889ff"
],
"is_package": false,
"package_visible_to": [],
"children": [],
"breadcrumbs": []
}
{
"error": "Invalid request"
}
Create a new user
GET
/
api/media/category/:category_id/resource
Get category content
Headers
Name
Value
Content-Type
application/json
Authorization
Bearer <token>
Params
Name
Type
Description
id
UUID
Category ID
Response
[
{
"id": "fbd4ac39-0309-4275-89f8-53b7da82a4c3",
"category_id": "627d8fb6-5600-4a88-965b-df5d068ec196",
"name": "Trening ",
"created_by": "ba52se50-86e7-4fb2-bf25-01d5ca19fbb6",
"created_at": "2024-01-15T10:30:25.721Z",
"icon": "training",
"description": "",
"tags": [],
"media_type": "video",
"metadata": {},
"modified_by": "ba52se50-86e7-4fb2-bf25-01d5ca19fbb6",
"modified_at": "2024-01-15T10:30:26.964Z",
"blob_url": "https://innocomdapistorage.blob.core.windows.net/media/fbd4ac39-0309-4275-89f8-53b7da82a4c3.mp4",
"blob_name": "fbd4ac39-0309-4275-89f8-53b7da82a4c3.mp4",
"playlist": []
},
{
"id": "6812deb2-e5da-441c-8d26-bb2ef305a828",
"category_id": "627d8fb6-5600-4a88-965b-df5d068ec196",
"name": "pl",
"created_by": "ba68ce50-86e7-4fb2-bf25-01d5ca19fbb6",
"created_at": "2024-02-10T12:03:48.467Z",
"icon": "call",
"description": "asdasd",
"tags": [],
"media_type": "playlist",
"playlist": [
{
"category_id": "627d8fb6-5600-4a88-965b-df5d068ec196",
"name": "trening bein",
"created_by": "ba68ce50-86e7-4fb2-bf25-01d5ca19fbb6",
"created_at": "2023-11-28T14:41:09.228Z",
"icon": "training",
"preview_url": "",
"description": "leggtrening for Skien",
"tags": [],
"media_type": "video",
"metadata": {},
"modified_by": "ba68ce50-86e7-4fb2-bf25-01d5ca19fbb6",
"modified_at": "2024-01-04T09:06:24.797Z",
"blob_url": "https://innocomdapistorage.blob.core.windows.net/media/b3840332-dd18-43aa-b0e8-70441d6f6e8d.mov",
"blob_name": "b3840332-dd18-43aa-b0e8-70441d6f6e8d.mov",
"resource_id": "b3840332-dd18-43aa-b0e8-70441d6f6e8d",
"id": "0e38c89e-eff9-4e68-b02f-2492bf95a681",
"sort_order": 2
}
],
"modified_at": "2024-02-10T12:04:46.620Z",
"modified_by": "ba68ce50-86e7-4fb2-bf25-01d5ca19fbb6"
},
{
"id": "b3840332-dd18-43aa-b0e8-70441d6f6e8d",
"category_id": "627d8fb6-5600-4a88-965b-df5d068ec196",
"name": "trening bein",
"created_by": "ba68ce50-86e7-4fb2-bf25-01d5ca19fbb6",
"created_at": "2023-11-28T14:41:09.228Z",
"icon": "training",
"preview_url": "",
"description": "leggtrening for Skien",
"tags": [],
"media_type": "video",
"metadata": {},
"modified_by": "ba68ce50-86e7-4fb2-bf25-01d5ca19fbb6",
"modified_at": "2024-01-04T09:06:24.797Z",
"blob_url": "https://innocomdapistorage.blob.core.windows.net/media/b3840332-dd18-43aa-b0e8-70441d6f6e8d.mov",
"blob_name": "b3840332-dd18-43aa-b0e8-70441d6f6e8d.mov",
"playlist": []
}
]
{
"error": "Invalid request"
}
Last updated