Video - OgnianApostolov/builderly-api-docs GitHub Wiki
Model
Video video {
"_id": {
"autogenerated": "true"
},
"name": {
"type": "string",
"required": "true"
},
"link": {
"type": "string",
"required": "true"
},
"collection_id": {
"ref": "Collection._ObjectId",
},
"selected": {
"type": "boolean",
"default": "false"
},
"custom_1": {
"type": "string"
},
"custom_2": {
"type": "string"
},
"custom_3": {
"type": "string"
},
"suitability_price_plans": [{
"ref": "PricePlane._ObjectId",
}],
"isSuitable": {
"type": "boolean"
},
"createdAt": {
"autogenerated": "true"
},
"updatedAt": {
"autogenerated": "true"
}
}
Methods
Create new
POST /videos
req.body required
method: 'POST'
{
url: 'https://{{your-builderly-domain}}/videos,
headers: {
'Authorization': 'Bearer ' + token
},
json: true,
body: {}
}
Responses
Success - status 201
{}
Error - status 400
{
error_message
}
Retrieve multiple
GET /videos?ionic=true
method: 'GET'
{
url: 'https://{{your-builderly-domain}}/videos?ionic=true',
headers: {},
json: true,
body: {}
}
Responses
Success - status 200
[{
title,
filters,
videos,
collection,
additionalFieldsLocales,
page_title,
about_page
}]
Not found - status 404
{}
Error - status 500
{
error_message
}
Query parameters:
- sortBy
createdAt:-1
(most recent) - used by defaultcreatedAt:1
(least recent)custom_1:-1
(custom_field_1 by ascending)custom_1:1
(custom_field_1 by descending)custom_2:-1
(custom_field_2 by ascending)custom_2:1
(custom_field_2 by descending)custom_3:-1
(custom_field_3 by ascending)custom_3:1
(custom_field_3 by descending) - collection
- Example usages:
/videos?ionic=true
- Get all videos
Retrieve single
GET /videos/:id?ionic=true
method: 'GET'
{
url: 'https://{{your-builderly-domain}}/videos/{{video._id}}?ionic=true',
headers: {},
json: true,
body: {}
}
Responses
Success - status 200
{
title,
videos
}
Not found - status 404
{}
Error - status 500
{
error_message
}
- Example usages:
/videos/:id?ionic=true
- Retrives a specific video
Update single
PATCH /videos/:id
method: 'PATCH'
{
url: 'https://{{your-builderly-domain}}/videos/{{video._id}}',
headers: {
'Authorization': 'Bearer ' + token
},
json: true,
body: {}
}
Responses
Success - status 200
{ video }
Error - status 400
{
error_message
}
Not found - status 404
{}
Delete single
DELETE /videos/:id?
method: 'DELETE'
{
url: 'https://{{your-builderly-domain}}/videos/{{video._id}}',
headers: {
'Authorization': 'Bearer ' + token
},
json: true,
body: {}
}
Responses
Success - status 200
{ video }
Not found - status 404
{}
Error - status 500
{
error_message
}