API Quickstart Apps
The API Quickstart apps provide sample code for obtaining an access token and making a simple query to the API. You can use the apps for reference, or modify them to test out your own API requests in a development environment.
Prerequisites
Before you begin, you will need three things:
- Your MyDataHelps service account name, like “MyDataHelps.1234.test.” See Service Accounts.
- Your MyDataHelps project ID. See API Basics.
- The private key you associated with your service account.
Note
The MyDataHelps API is designed for server-to-server communications. You will not be able to access it from client-based browser JavaScript.
Quickstart Apps
Quickstart apps are available in the following languages:
Postman Collection
Postman is a great tool for testing REST APIs. The MyDataHelps Postman Collection contains a number of sample queries to help you get up and running quickly.
To use the collection:
- Install Postman.
- Import the collection into Postman. Postman has a number of ways to do this. You could fork the collection, or download and then import the collection into the Postman app. Consult the Postman documentation for details.
- Set up the project variables as described in the “Documentation” tab of the collection.
- Select a query from the collection.
- Adjust the parameters and body data as needed.
- Click “Send.”
Once you configure your project variables, the collection handles the authentication and content headers for you.
Note
The queries come with sample parameters, such as fake participant IDs and body data. You will need to modify these to fit your project.
If Postman is not right for you, there are numerous other REST API testing tools. However, most of these tools do not readily support the private key authentication needed by the API. To get around this, you can use one of the quickstart apps to obtain a temporary access token. It will only be good for a few minutes, and you will need to manually include it in your content headers.
Note
In your API requests, be sure to set the access token and content headers. See
API Basics for details.