Postman is an API platform that you can use to access the APIs. It can be downloaded from https://www.postman.com/downloads/ and you can select to either run it in a downloadable app or in the browser.
To access your APIs using Postman:
Create an Application Access in Usage Engine as described in Configuring Application Access. Ensure to copy the Client Secret since it will only be visible when creating the Application Access.
Either download the Postman app, or select to run it in a browser, and create an account and sign in.
The API specification can be downloaded from the Usage Engine API page for your environment Environments. The detailed documentation of the API is available on the same endpoint.
Go to the workspace and import the openapi.json specification in Postman as a Postman Collection.
Before accessing any API, you must create a bearer token. You can do this by using the Create Access Token API endpoint POST /oauth/token which is found in the API in theauthentication
section fo the API specification.Add the Base URL into the POST {{baseUrl}}/authentication/v1/oauth/token request and add the Client Id and Client Secret in the body of the request. We recommend using a Postman variable for client Id, Client secret and token value.
Send a request to generate token.
Save the generated token as a variable.
Go to the API that you want to send request, in the example below, the Usage Metering API for List meter types.
Go to Authorization tab, select Bearer Token in the Auth Type drop-down list and enter the variable you used to save your bearer token.
!!!!!!!! Proposal on using standard way of getting the token. !!!!!!!!!!!!!!!!!!!!!!!!
Go to Authorization tab, select Bearer Token in the Auth Type. Configure getting the token by using {{baseUrl}}/authentication/v1/oauth/token (with the correct baseUrl for your account) and with the information provided by the Application Access. Pay attention Usage Engine CE Authorization endpoint uses “Send client credentials in body” as the Client Authentication method.
!!!!!!!!!!!!!!!!!!!!! End proposal. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Update the body and query parameters with relevant parameters and send the request.
You can now create, list, update or delete the API endpoints provided by Usage Engine.
For more information on postman variables and environments, refer to Postman variable and environment. You can save the configuration of various environment like sandbox and production using environments.