Skip to content

Postman Collections for APIs

This section takes you through on how to create postman colletions for the API definitions.

How to create a token

Use the Authentication Postman collection [1] for this purpose. There are 2 steps to generate a token.

  1. Register an Oauth app

    This is done to generate the client ID and client secret to be used to fetch tokens. If you are in a local environment use localhost:8243. If not, point the hotname:port to the gateway host.

  2. Generate access token

    Run the relevant POST after registering an Oauth app. This will generate an access token and set it to an environment variable automatically. All the other API collections acontain a collection wide authorization header to include the access token generated in this step. Therefore, when invoking APIs, there is no need to specify the generated tokens as they are added by postman.

Postman collection

[1] Authenticattion - https://documenter.getpostman.com/view/12159963/2s9YXfai2n

Invoking APIs

Any of the following postman collections can be invoked after generating a token. Note that the access token generated in the step 2 above is valid only for 1 hour by default.

When it expires, you will get a 401 error as the response to any API call. When this happens, simply run the step 2 again and invoke the desired API afterwards.

[2] Android API - Contains all the admin APIs related to managing an Android device.

[3] Core APIs - These are the common and generic apis to manage all the devices, policies, operation, configurations, etc.

[4] iOS APIs - Contains all the admin APIs related to managing an iOS device.

[5] Windows APIs - Contains all the admin APIs related to managing an Windows device.

[6] Store APIs - Contains all the admin APIs related to managing apps that are available on the store, instilling the apis on devices, adding reviews to apps, etc.