Postman is a Chrome plugin and desktop application that helps you interact with APIs and see the output. We use it throughout our documentation to illustrate making authenticated requests with the Data Lens REST API. Other similar tools are available, but we recommend Postman so you can better follow our examples.
To install Postman, download it from getpostman.com. Depending on which platform you decide to install, launching the application will be different, but the interface will be the same. To understand more about how to use Postman, we recommend you read their official documentation.
At the heart of Postman are collections, a group of individual requests and resources that form the API. Within a collection, resources can be organized into logical folders, and parameters such as authentication tokens received from one resource can be reused in others, making testing an API a more cohesive experience.
We have created two files to help you experiment with the Data Lens REST API. An environment file that helps you set global variables for working with the Data Lens REST API, and a collection of ready-made API requests with responses from some API calls included in the requests.
Import the Collection and Environment Files
To import, click the Import button on the top black bar of the application, click Choose Files under Import File and select the two files downloaded from above.
Set up Postman with your HERE Account Credentials
Postman lets you store credentials and variables so you do not need to keep entering them for every resource request. We recommend you add your account credentials, as well as the app_id and app_code sent to you after you registered for Data Lens:
https://datalens.api.here.comas the active environment from the drop-down list next to the eye icon.
- Click the eye icon and click Edit next to Globals at the bottom of the drop-down list.
- In the Manage Environments box, select
https://datalens.api.here.comin the list of environments.
- In the value column for HERE.ACCOUNT.EMAIL, enter your HERE Account email address.
- In the value column for HERE.ACCOUNT.PASSWORD, enter your HERE Account password.
- In the value column for DATALENS.APP_ID, enter your app_id.
- In the value column for DATALENS.APP_CODE, enter your app_code.
- Click Update in the box.
Your environment variables are now set up correctly. The next step is to get an access token using your authentication credentials so you can make requests to the Data Lens REST API.
Getting an Authentication Token with Postman
After Postman is installed, you can get an authentication token to communicate with the Data Lens REST API, as described in Authentication with Postman.