Categories
Categories
Categories can be used to label videos within your content library. They are like pre-defined tags. They are more applicable to usage in the dashboard as they are presented in a dropdown menu. Hence instead of requiring just a value, we ask for a separate name and value. These act as the label and option (value) in a dropdown menu.
You can manage your categories by making the following requests:
Request | Description |
---|---|
GET /categories | Return the details of all of the categories in your account |
GET /categories/:id | Return the details of a single category |
PATCH /categories/:id | Update a category |
DELETE /categories/:id | Delete a category |
POST /categories | Create a category |
GET /categories
Return the details of all of the categories in your account.
Example request
curl \-H "Authorization: Bearer YOUR-API-KEY" \"https://api.vidbeo.com/v2/categories"
Example response
{ "success": true, "result": [ { "id": "abcde12345abcde12345a", "name": "Cars", "value": "cars", "created_by": "abcde12345abcde12345a", "created_time": "2021-02-01T00:00:00.000Z", "updated_by": "abcde12345abcde12345a", "updated_time": "2021-02-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
Return the details of a single category.
Example request
curl \-H "Authorization: Bearer YOUR-API-KEY" \"https://api.vidbeo.com/v2/categories/abcde12345abcde12345a"
Example response
{ "success": true, "result": { "id": "abcde12345abcde12345a", "name": "Cars", "value": "cars", "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
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
Update a category.
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
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
{ "success": true, "result": { "id": "abcde12345abcde12345a", "name": "New", "value": "new", "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 /categories/:id
Delete a category.
Example request
curl \-H "Authorization: Bearer YOUR-API-KEY" \-X DELETE \"https://api.vidbeo.com/v2/categories/abcde12345abcde12345a"
Example response
{ "success": true, "result": {}, "links": null, "errors": []}
POST /categories
Create a category.
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
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
{ "success": true, "result": { "id": "abcde12345abcde12345a", "name": "Cars", "value": "cars", "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": []}