Postman collection

Postman is a popular API platform for developers to design, build, test APIs. It's multiplatform and you can download it for free after signing in.

This page covers the import of the Astara Connect API collection and the required steps to setup the authorization method to send requests using Postman.

Importing the OpenAPI file

Save the openapi json file, and Import the file into Postman. For more info about importing openapi collections into see the official Postman documentation

In the Import dialog, in advanced options, it's recommended to set to Schema the options Request parameter generation and Response parameter generation.

Setting up the Authorization method

There are two options: Bearer Token or API Key. For both methods, it's recommended to edit the Authorization method in the Collection settings.

API Key method

In the Athorization tab of the Edit Collection modal, select Type: API Key. Set the key input to X-BOTON-APIKEY and, for the value input, declare a new variable {{api_key}}

You will need to define and set the declared variable {{api_key}} with your company API Key. This is done in the collection Variables tab:

Note that the variable {{baseUrl}} is already defined from the collection import, with it's value set to https://api.astaraconnect.com. These variables could be defined as Postman Environment variables, so you could easely switch from staging to production environment URLs and API-Keys. Further information about Postman variables can be found in the official documentation

Bearer token method

First of all, you need to get the token using the endpoint /v1/users/login with a valid user email and password in the request body.

Copy the returned token to paste the value in the Bearer Token input in the Authorization tab of the Edit collection modal.

Request Authorization

To use the authorization method defined in the Collection settings, make sure that the option Inherit auth from parent is selected in the Request Authorization type input.