Testing REST API Calls Using Postman

August 18, 2020

HERE REST APIs Using PostmanData robustness is a driving factor behind HERE Location Services’ powerful capabilities, from supply chain logistics to mobility. That same robustness can pose challenges to testing application performance.

HERE Location Services’ REST APIs provide a way to return rich data for integrating robust location features into applications. Use cases include:

  • Routing
  • Map tiles
  • Traffic
  • Geocoding

Because such a wide array of parameters can be included in HERE REST API calls, testing URLs in a web browser can be unwieldy.

Thankfully, the Postman app makes testing REST API calls much simpler.

Working in the Postman Interface

To get started, download the Postman app or use the recently released web version of its API collaboration platform.

Choosing global variables makes selected variables accessible to any request within your workspace. I found it useful to set up a global variable for the apiKey, as follows:

  • Click on the Manage Environments icon in the upper right of the window
  • At the bottom, click Global, and you’ll see this window:

    Postman Global Variable
  • Enter “apiKey” in the VARIABLE column
  • Enter your apiKey from HERE under CURRENT VALUE

Before beginning the test, make sure the request type is set to GET and enter the request URL. Our example uses the Routing API, so we’ll enter https://router.hereapi.com/v8/routes.

Finish constructing the request by inputting the parameters in the Query Params section:

  • Enter “apiKey” in the KEY column and in the VALUE column to call the global variable (created above)
  • For a Routing request, we need a minimum of transportMode, origin, and destination

    Postman Routing Request

When you have entered the parameters, click Send, and a response window similar to this one will appear:

Postman Response

As you start building more complex requests, you can easily turn specific parameters on and off by clicking the checkbox. You can also change their values.

Have questions or need help? Don’t hesitate to contact us. And if you want to learn more about what you can do with the powerful HERE APIs, read our fact sheet, HERE Developer Tools: 3 Key Benefits for App Developers.HERE Developer Tools Fact Sheet

Subscribe to ADCi's Blog