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:

RequestDescription
GET /categoriesReturn the details of all of the categories in your account
GET /categories/:idReturn the details of a single category
PATCH /categories/:idUpdate a category
DELETE /categories/:idDelete a category
POST /categoriesCreate 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)

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 /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

KeyTypeDescription
idStringThe unique identifier given to this category
nameStringThe name of this category (its label)
valueStringThe value of this category
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 /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'.

KeyTypeDescription
nameStringThe name of the category (1-40 characters)
valueStringThe 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": []
}