API Documentation
Introduction
The DriveBird Network API lets you programmatically manage your assets and other static resources using conventional HTTP requests. Any action that you can perform through the DriveBird Network Control Panel (except for creating access tokens and billing management) can also be performed with the API.
Endpoints and response type
You need to use POST
method and JSON
object as raw body content to: https://www.drivebird.com/api
for every request.
There are no dedicated endpoints for each API.
All APIs should be pointed to the above mentioned URL.
Response type is always JSON
.
No matter what, three keys will always be present.
-
Response master keys:
status
(integer
): By usingstatus
code you will know if your request was successful or error.errors
(numeric array
): List of errorsstring
if occurred else empty.data
(object
): All relative data as a response of your request.
Example:
{ "status": 200, "errors": [], "data": { "msg": "The asset has been uploaded", "url": "https://cdn.drivebird.com/storage/user-id/bucket-name/20220103-161644-632-file-name.jpg" } }
API status and explanation
The status
is a numeric number which represents the result-type of the API call.
This is the same as HTTP Status Code.
status code |
Details regarding status code |
---|---|
200 |
No error occurred. You have your requested data in the data parameter. |
400 |
Your requested parameter or structure is wrong. |
401 |
You are not authorized to access. Please check your access key and access token. |
403 |
Forbidden, we can not provide data for the request. |
404 |
Request success but there is no data to provide. |
500 |
Something went wrong on the server side. Try again later or contact us. |
503 |
Service is unavailable, may be in development mode. |
For more details about the code visit RestAPITutorial.
Calling the APIs
The status
can be divide into two section. One is common and other one is request (application) specific.
Please see below for common status codes. Application specific code status can be found on application API page.
status code |
Details regarding status code |
---|---|
200 |
No error occurred. You have your requested data in the data parameter. |
400 |
Your requested parameter or structure is wrong. |
401 |
You are not authorized to access. Please check your access key and access token. |
403 |
Forbidden, we can not provide data for the request. |
404 |
Request success but there is no data to provide. |
500 |
Something went wrong in server side. Try again later or contact us. |
503 |
Service is unavailable, may be in development mode. |
For more details about the code visit RestAPITutorial website.
API test and debug
Paste the payload JSON
body and hit submit button.
The response will be displayed here.
Requests
Functionality available through the API, allowing you to script the complex actions that your situation requires.
Name | Purpose | Payload |
---|---|---|
Test | Testing. |
{ "model":"Example", "method":"demo", "arg":{ } } |
ChatBot | Exchange text with ChatBot |
{ "model":"ChatBot", "method":"textExchange", "arg":{ "text":"hi" } } |
Need more APIs? Having difficulties to call API? I am here to help.