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:

RequestDescription
GET /foldersReturn the details of all of the folders in your account
GET /folders/:idReturn the details of a single folder
PATCH /folders/:idUpdate a folder
DELETE /folders/:idDelete a folder
POST /foldersCreate a folder
GET /folders/:id/videosGet the videos in a folder
POST /folders/:id/videos/:idAdd a video to a folder
DELETE /folders/:id/videos/:idRemove a video from a folder

GET /folders

Return the details of all of the folders in your account.

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",
"parent_id": "",
"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

GET /folders/:id

Return the details of a single folder.

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",
"parent_id": "",
"created_by": "abcde12345abcde1234a",
"created_time": "2021-02-01T00:00:00.000Z",
"updated_by": "abcde12345abcde12345a",
"updated_time": "2021-02-01T00:00:00.000Z"
},
"links": null,
"errors": []
}

Response format

KeyTypeDescription
idStringThe unique identifier given to this folder
nameStringThe name given to this folder
parent_idStringIf this folder has a parent folder, the ID of that 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

PATCH /folders/:id

Update a folder.

The body of the request should contain one, or more, attributes that you would like to update for the folder. Please be very careful when making changes to existing items to avoid losing data, particularly if a particular key has sub-keys.

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",
"parent_id": "",
"created_by": "abcde12345abcde1234a",
"created_time": "2021-02-01T00:00:00.000Z",
"updated_by": "abcde12345abcde12345a",
"updated_time": "2021-02-01T00:00:00.000Z"
},
"links": null,
"errors": []
}

DELETE /folders/:id

Delete a folder.

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": []
}

POST /folders

Create a folder.

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",
"parent_id": "",
"created_by": "abcde12345abcde1234a",
"created_time": "2021-02-01T00:00:00.000Z",
"updated_by": "abcde12345abcde12345a",
"updated_time": "2021-02-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)

Optional parameters

KeyTypeDescription
parent_idStringIf you would like this folder to be a sub-folder (in another) you can provide the ID of its parent folder

GET /folders/:id/videos

Get the videos in a folder.

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

POST /folders/:id/videos/:id

Add a video to a folder. Of course the first :id is the ID of the 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": []
}

DELETE /folders/:id/videos/:id

Remove a video from a folder. Of course the first :id is the ID of the 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": []
}