This document will help you learn the basics of the Digital Fleet API, from authentication to error handling and available endpoints.
You can also take a look at our interactive documentation here:
https://dfapi.digitalfleet.com/swagger
General Information
Host
dfapi.digitalfleet.com
HTTPS Required
HTTPS is required for all API connections. Connection requests over HTTP will be rejected by
the Digital Fleet server.
Restrictions
Digital Fleet enforces a number of restrictions when working with our API. Details about API usage restrictions can be found in the API documentation for GET ApiRestriction.
Authentication
To authenticate, include your Digital Fleet provided API Key in a HTTP header named
X-API-KEY. Failure to include a valid API Key in this header will result in a HTTP 401 -
Unauthorized response from the server. This header must exist in all API requests.
Pagination
Pagination allows you to split up large requests into multiple pages of data using input
parameters. This is required to produce performant APIs that do not place a burden on the
system.
- page - The page of data you would like returned (defaults to 1)
- pageSize - The number of results you would like per page (defaults to 100, cannot exceed 1000 results)
Dates/Times
All times (request and response) use the ISO-8601 standard format. All times in data returned
by the API are in UTC.
Response Codes and Errors
Standard HTTP response codes will be used to communicate success or failure to the client.
For example, a 400 will indicate that there was an error in the request, and a 500 will indicate
that an unexpected error occurred on the server. In either case, when an error occurs where
more information can be provided about what happened, a response body will be returned with
a “message” data attribute for debugging purposes.
{
“message”: “Some information about what happened”
}
Response Body Format
The response bodies for successful API requests will contain the data requested as well as
some additional metadata about the response that can be used to issue further requests.
{
“metadata”: {
“pagination”: {
“page”: 1,
“perPage”: 100,
“totalPageCount”: 25,
“totalRecordCount”: 2500
},
“sort”: “eventTime,eventType_desc”
},
“data”: [
{
“userId”: 1,
“eventTime”: “2018-04-23T20:34:17Z”,
“eventType”: 1
},
{
“userId”: 1,
“eventTime”: “2018-04-23T22:34:17Z”,
“eventType”: 2
}
...
]
}
API Endpoints
https://dfapi.digitalfleet.com/swagger
Comments
0 comments
Article is closed for comments.