API Reference
Log In
API Reference

Dronesmith API Reference

Getting Started

šŸ“˜

This is the development documentation. Things are subject to change as the API is tested and features are requested and implemented, or removed.

Each request is made to: api.dronesmith.io/api/
All API requests are prefixed with /api/.

All request and response data are marshaled as JSON. Please include ā€œContent-Typeā€ and ā€œapplication/jsonā€ in your request header when sending request data to the API.

A valid user email address and API key are required to use the Dronesmith API. These components must be included with every request made to the API within the request headers.

Your email address should be included in the request headers as ā€œuser-emailā€ and your api key as ā€œuser-keyā€. See the example below for more information.

To get an API key, simply go to http://api.dronesmith.io and create an account. Your API key will be sent to you in your confirmation email. You do not need to verify your account to use the API. You can also retrieve your API key at any time by logging into http://api.dronesmith.io and selecting ā€œaccountā€ from the status bar.

An easy way to verify you can talk to the Dronesmith API is to simply send a GET request to api.dronesmith.io/api/.

Here is an example request.

Headers:
user-email [email protected]
user-key a1204f04-c2a9-477b-ae20-a8bba455da09

GET /api/

Response:
403 - Forbidden, request failed to authenticate
204 - Success (no response content)

A response code of 204 indicates that you can talk to the Dronesmith API and your email/key were successfully authenticated. All API requests will respond with 403 (Forbidden) if there was a failure to authenticate. Any request path or method made that does not exist in the API will respond with a 404 (Not found) status code.

Successful responses: To retain consistency, all API requests return JSON data. Many responses, especially those of POST, PUT, or DELETE methods do not have any data to send back. These responses will send back the following, case-insensitive vernacular if they have completed a request successfully, but have no further content:

Status code: 200
JSON: {ā€œstatusā€: ā€œOKā€}

Error responses: If the API encounter an error handling a request, such as being unable to find a drone object with a specified ID or name, it will return the following:

Status code: 400
JSON: {ā€œerrorā€: ā€œdescription of error hereā€}

The API always follow these conventions when dealing successful responses and errors; developers can use these to help determine the outcome of their API request. Please keep in these responses are case insensitive, so parsing for case may be needed, depending on the developer’s implementation.