Categories
Categories can be used to label videos within your content library. They are like pre-defined tags. You can manage your categories by making the following requests:
GET /categories
Example request
shell
curl \
-H "Authorization: Bearer YOUR-API-KEY" \
"https://api.vidbeo.com/v2/categories"
Example response
json
{
"success": true,
"result": [
{
"id": "abcde12345abcde12345a",
"name": "Cars",
"value": "cars",
"created_by": "abcde12345abcde12345a",
"created_time": "2022-01-01T00:00:00.000Z",
"updated_by": "abcde12345abcde12345a",
"updated_time": "2022-01-01T00:00:00.000Z"
}
],
"links": {},
"errors": []
}
Optional parameters (query string)
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 /categories/:id
Example request
shell
curl \
-H "Authorization: Bearer YOUR-API-KEY" \
"https://api.vidbeo.com/v2/categories/abcde12345abcde12345a"
Example response
json
{
"success": true,
"result": {
"id": "abcde12345abcde12345a",
"name": "Cars",
"value": "cars",
"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 category |
name | String | The name of this category (its label) |
value | String | The value of this category |
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 /categories/:id
The body of the request should contain one, or more, attributes that you would like to update for the category. Please be careful when making changes to existing items to avoid losing data, particularly if a particular key has sub-keys.
Example request
shell
curl \
-g \
-H "Authorization: Bearer YOUR-API-KEY" \
-H "Content-Type: application/json" \
-X PATCH \
-d '{"name":"New", "value":"new"}' \
"https://api.vidbeo.com/v2/categories/abcde12345abcde12345a"
Example response
json
{
"success": true,
"result": {
"id": "abcde12345abcde12345a",
"name": "New",
"value": "new",
"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 /categories/:id
Example request
shell
curl \
-H "Authorization: Bearer YOUR-API-KEY" \
-X DELETE \
"https://api.vidbeo.com/v2/categories/abcde12345abcde12345a"
Example response
json
{
"success": true,
"result": {},
"links": null,
"errors": []
}
POST /categories
Required parameters
Its name and its corresponding value. These can be the same but normally they are used in the context of populating a dropdown menu. For example the name might be 'Cars' (the label), and its value a lowercase version of it 'cars'.
Key | Type | Description |
---|---|---|
name | String | The name of the category (1-40 characters) |
value | String | The value of the category (1-40 characters) |
Example request
shell
curl \
-g \
-H "Authorization: Bearer YOUR-API-KEY" \
-H "Content-Type: application/json" \
-X POST \
-d '{"name":"Cars","value":"cars"}' \
"https://api.vidbeo.com/v2/categories"
Example response
json
{
"success": true,
"result": {
"id": "abcde12345abcde12345a",
"name": "Cars",
"value": "cars",
"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": []
}