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:
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
Name | Type | Default | Information |
---|---|---|---|
limit | String | 25 | Maximum number to return |
cursor | String | "" | Used to get the next page of results: if applicable we return this as part of the links.next URL |
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
Key | Type | Description |
---|---|---|
id | String | The unique identifier given to this folder |
name | String | The name given to this folder |
created_by | String | The ID of the user who created it (if known) |
created_time | String | The date and time it was created |
updated_by | String | The ID of the user who last modified it (if known) |
updated_time | String | The date and time it was last modified |
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 /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": []
}
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.
Key | Type | Description |
---|---|---|
name | String | The name of the folder (1-100 characters) |
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
Name | Type | Default | Information |
---|---|---|---|
limit | String | 25 | Maximum number to return |
cursor | String | "" | 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
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": []
}
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": []
}