Use our Video API to handle your video storage, transcoding and delivery.
https://api.vidbeo.com/v2/[resource]/[parameters]
Method | Action |
---|---|
GET | Used to get data about resources |
POST | Used to create a new resource |
PATCH | Used to update a resource. Any top-level attributes not included in your request will be left unchanged |
DELETE | Used to delete a resource |
Code | Meaning |
---|---|
200 | The request was successful |
400 | The request was invalid. Please check that you are including all required fields and that each value is the correct type |
401 | The request could not be authorised. If you get this response code, please check that you are sending a valid API key |
403 | The request is forbidden. The API key used is either invalid or does not permit that action on that resource |
404 | The requested endpoint or resource could not be found. If you get this response code when trying to access an individual object, it has likely been deleted |
429 | Too many requests have been made. You may have hit our rate-limit or our system is under load. Please wait for a short period of time before making another request |
500 | There is a temporary problem with the API which resulted in an error |
503 | There is a temporary problem with the API meaning it is currently unavailable |
curl
as that makes it easy to illustrate how the requests are structured. However you will likely use a HTTP request library in your chosen language to do the same thing. For example PHP’s Guzzle or NodeJS’s Got.
2022-01-01T12:00:00.000Z
Dates passed to the API as part of your request need to also follow this format. For example:
2022-01-01
https://api.vidbeo.com/v2/resource/method?parameter1=value1¶meter2=value2
For POST, PATCH and DELETE requests, parameters should be passed within the body of the request (as JSON). Make sure to send the correct headers:
Content-Type: application/json
Accept: application/json
Variable | Type | Description |
---|---|---|
limit | Int | The number to return per page |
cursor | String | A long string of characters which tells our system where to start the next requst from |
limit
. For example ?limit=5
.
And then if the response contains a links
object which has a next
key, that’s the URL to use for your next API request to get the next page of results. That link will include a cursor. For example it may end like: ...?limit=5&cursor=a-long-value
.
There are two different ways you can check to see if another request for another page needs to be made:
1) You can count the number of results. If you requested a limit of 10 items and only 5 have been returned clearly there won’t be another page of results following that one.
2) You can check whether the response contains a links object that contains a next key.
The exception in both these cases is when the number of results happens to match the number requested per page. For example if you ask for a limit of 10 items per page, and 10 are returned, there is not enough information to know whether there is an 11th item and so whether there is another page of results. Therefore the links.next URL may be built, in case. Upon requesting that next URL, it is at that point that you will know (since its result array will be empty).