Folders

Folders

Folders can be used to organise items within your content library. Currently we only support putting videos in a folder.

You can manage your folders by making the following requests:

Return the details of all your folders
GET /folders

Example request

curl \
-H "Authorization: Bearer YOUR-API-KEY" \
"https://api.vidbeo.com/v2/folders"

Example response

{
"success": true,
"result": [
{
"id": "abcde12345abcde12345a",
"name": "Example folder",
"created_by": "abcde12345abcde12345a",
"created_time": "2021-01-01T12:00:00.000Z",
"updated_by": "abcde12345abcde12345a",
"updated_time": "2021-01-01T12:00:00.000Z"
}
],
"links": {},
"errors": []
}

Optional parameters

NameTypeDefaultInformation
limitString25Maximum number to return
cursorString""Used to get the next page of results: if applicable we return this as part of the links.next URL
Return the details of a single folder
GET /folders/:id

Example request

curl \
-H "Authorization: Bearer YOUR-API-KEY" \
"https://api.vidbeo.com/v2/folders/abcde12345abcde12345a"

Example response

{
"success": true,
"result": {
"id": "abcde12345abcde12345a",
"name": "Example folder",
"created_by": "abcde12345abcde1234a",
"created_time": "2022-01-01T00:00:00.000Z",
"updated_by": "abcde12345abcde12345a",
"updated_time": "2022-01-01T00:00:00.000Z"
},
"links": null,
"errors": []
}

Response format

KeyTypeDescription
idStringThe unique identifier given to this folder
nameStringThe name given to this folder
created_byStringThe ID of the user who created it (if known)
created_timeStringThe date and time it was created
updated_byStringThe ID of the user who last modified it (if known)
updated_timeStringThe date and time it was last modified
Update a folder
PATCH /folders/:id

The body of the request should contain one, or more, attributes that you would like to update for the folder.

Example request

curl \
-g \
-H "Authorization: Bearer YOUR-API-KEY" \
-H "Content-Type: application/json" \
-X PATCH \
-d '{"name":"New name"}' \
"https://api.vidbeo.com/v2/folders/abcde12345abcde12345a"

Example response

{
"success": true,
"result": {
"id": "abcde12345abcde12345a",
"name": "New name",
"created_by": "abcde12345abcde1234a",
"created_time": "2022-01-01T00:00:00.000Z",
"updated_by": "abcde12345abcde12345a",
"updated_time": "2022-01-01T00:00:00.000Z"
},
"links": null,
"errors": []
}
Delete a folder
DELETE /folders/:id

Example request

curl \
-H "Authorization: Bearer YOUR-API-KEY" \
-X DELETE \
"https://api.vidbeo.com/v2/folders/abcde12345abcde12345a"

Example response

{
"success": true,
"result": {},
"links": null,
"errors": []
}
Create a folder
POST /folders

Example request

curl \
-g \
-H "Authorization: Bearer YOUR-API-KEY" \
-H "Content-Type: application/json" \
-X POST \
-d '{"name":"A folder"}'
"https://api.vidbeo.com/v2/folders"

Example response

{
"success": true,
"result": {
"id": "abcde12345abcde12345a",
"name": "A folder",
"created_by": "abcde12345abcde1234a",
"created_time": "2022-01-01T00:00:00.000Z",
"updated_by": "abcde12345abcde12345a",
"updated_time": "2022-01-01T00:00:00.000Z"
},
"links": null,
"errors": []
}

Required parameters

The only required parameter is the name of the folder.

KeyTypeDescription
nameStringThe name of the folder (1-100 characters)
Get the videos in a folder
GET /folders/:id/videos

Currently we only support putting videos into a folder. To retrieve those in a particular folder, try this API call. Rather than return folders, it will of course return videos. And so please see the videos documentation for the response structure.

Example request

curl \
-H "Authorization: Bearer YOUR-API-KEY" \
"https://api.vidbeo.com/v2/folders/abcde12345abcde12345a/videos"

Example response

{
"success": true,
"result": [
{
"id": "abcde12345abcde12345a",
"type": "vod",
"name": "Example video",
...
}
],
"links": {},
"errors": []
}

Optional parameters

NameTypeDefaultInformation
limitString25Maximum number to return
cursorString""Used to get the next page of results: if applicable we return this as part of the links.next URL
Add a video to a folder
POST /folders/:id/videos/:id

The first :id is the ID of your folder and the second :id is the ID of the video.

Example request

curl \
-H "Authorization: Bearer YOUR-API-KEY" \
-X POST \
"https://api.vidbeo.com/v2/folders/abcde12345abcde12345a/videos/abcde12345abcde12345a"

Example response

{
"success": true,
"result": {},
"links": null,
"errors": []
}
Remove a video from a folder
DELETE /folders/:id/videos/:id

The first :id is the ID of your folder and the second :id is the ID of the video.

Example request

curl \
-H "Authorization: Bearer YOUR-API-KEY" \
-X DELETE \
"https://api.vidbeo.com/v2/folders/abcde12345abcde12345a/videos/abcde12345abcde12345a"

Example response

{
"success": true,
"result": {},
"links": null,
"errors": []
}