To help you learn how to construct requests to the Autotask REST API, Datto provides a customizable REST API request collection for use with Postman. The examples it contains are for educational purposes only. Datto does not guarantee or warranty their functionality.
The collection is contained in a JSON-formatted file. Before you can begin making test requests, you'll need to import the file into Postman and configure the collection for your environment. To learn how to do so, follow the steps in the following sections of this article.
1. Install Postman
If you haven't done so already, download and install Postman on a local computer with an available internet connection. Refer to Downloading Postman for more information.
3. Import the collection into Postman
- Launch Postman and navigate to File > Import.
- The Import window will populate. Drag and drop the JSON file you downloaded into the File tab. Alternatively, you can click the Upload Files button and manually navigate to the collection.
- The Confirm your import screen will appear. Review the information it presents. Then, click Import.
- When the import finishes, you'll see the collection on the Collections tab of Postman's My Workspace view. Click the > icon next to the collection's name to view its contents.
- To make requests to the Autotask REST API, you'll need to set up your collection's variables. Right-click the collection's name. Then, click Edit.
- The Edit Collection window will open. Click the Variables tab.
- Edit the following attributes to match your environment:
- webservices[n]: Use the zone where your database is located. For example, a database in the America East zone would use the value of "webservices3" (without quotes). You can find a list of zones at Autotask API zones and WSDL versions.
- ApiIntegrationCode: Enter the custom tracking identifier shown for the account in Autotask on the Resources page at > Admin > Features & Settings > Resources/Users (HR) > Resources/Users (HR) > Resources/Users. Alternatively, enter the API integration code provided to you as a third-party vendor.
- UserName: Enter the API account username shown on the Autotask Resources page.
- Secret: Enter the Password (Secret) value for the API account.
- Click Update. Postman will automatically populate the API request headers for the collection with the information you provided.
NOTE You may also need to update some of the IDs and fields in these examples with your database's information before they'll work. In most cases, any issues you encounter with these requests will relate to information specific to your database or to your API user not having permission to perform the action you are testing.
4. Begin making API calls
You're now ready to begin exploring and making API calls. You can use the examples provided in the collection as a syntax reference and as a framework to build your own queries. For further information about working with the REST API, refer to the Additional resources section of this article.