This article describes setting up and using the REST API with Datto device integrations.
- Datto Partner Portal
- Datto REST API
Datto’s new REST API lets vendors create a dynamic integration experience in a more reliable and scalable way. It is also available for MSPs that have an experienced technical background.
Creating an integration with Datto’s REST API provides an easy way to retrieve readily available device, agent, and backup status information. The Datto REST API uses the industry-standard Swagger UI for an interactive documentation experience that allows developers to trial responses from their own devices on their portal accounts.
How do I access the API Configuration Options?
1. Log into the Datto Partner Portal.
2. Click the Admin tab, then select Integrations from the drop-down menu.
3. On the Integrations page, click the BCDR button at the top of the screen.
3. The Business Continuity and Data Recovery integration information panes will now open. Click the Enable API button in the top portion of the pane.
4. The Datto REST API is now enabled, and configuration options will now appear.
REST API Configuration options
- Disable API: disables the Datto REST API
- Documentation: Expands the REST API documentation pane
- Regenerate Key: generates a new public API key
- Reveal: displays the secret key's actual characters on-screen
Accessing Datto REST API documentation
Click the Documentation button in the REST API options pane. The pane will expand and open the API documentation, including basic API options and options for the individual endpoints.
REST API documentation pane options
- Authorize: The REST API uses a basic authentication scheme, with an automatically generated public API key/secret API key.
- Server: This drop-down menu shows what server the API is currently communicating with, and lets you select different available servers.
REST API endpoint options
The REST API documentation provides a menu of all configurable endpoints. You can use the Try It Out button to change parameters within each endpoint:
1. Click an endpoint to expand its options.
The endpoint will expand, showing all parameters accepted in the URL, as well as the JSON representation of the responses from the server.
Previewing API call results with the Swagger UI
The swagger UI lets you change endpoint parameters, run "preview" API calls, and view detailed results of the change at the presentation and code levels.
In this view, you can:
- change each parameter and get a preview of the change's effect
- see the responses generated by each preview request as a Curl command and URL
- see the HTTP response codes generated when the server responds to the API call preview
- download the JSON code block generated by your trial API calls
To change parameters and preview an API call:
1. Click the Try it out button in the upper right-hand corner.
2. Edit fields will open for each parameter. Make the changes you want, then click the Execute bar. to make the new API call.
3. In the Responses pane beneath the Execute bar, you can view the Curl commands, request URL, HTTP code, response headers, and response code block generated by the preview API call. Click the Download button to download the code block as a JSON file. Click Clear to reset the API call preview.