Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. 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.

  2. Either download the Postman app, or select to run it in a browser, and create an account and sign in.

  3. 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.

  4. 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 the authentication section fo the API specification.

  5. 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.

  6. Send a request to generate token.

    Screenshot 2024-05-28 at 12.36.47.pngImage Removed
  7. Save the generated token as a variable.

  8. Go to the API that you want to send request, in the example below, the Usage Metering API for List meter types.

  9. 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.

    Screenshot 2024-05-28 at 12.56.32.pngImage Removed

!!!!!!!! Proposal on using standard way of getting the token. !!!!!!!!!!!!!!!!!!!!!!!!

...

  1. Configure this in the Authorization tab.

  2. Select which endpoint you want to start using, for example List meter types. Navigate to Authorization tab, select OAuth 2.0 as the authentication type. Configure getting the token by using {{baseUrl}}/authentication/v1/oauth/token (with the correct

...

  1. AccesTokenUrl for your account) and with the information provided by the Application Access. Pay attention Usage Engine CE Authorization endpoint uses

...

  1. "Send client credentials in

...

  1. body" as the Client Authentication method.
    Provide the ClientID and ClientSecret that you obtained when creating the Application.

    Screenshot 2024-06-04 at 15.12.16.pngImage Added

  2. Add an additional Key in the Token request named audience. Configure this to match the base url of the environment you are using Environments.

    Screenshot 2024-06-04 at 15.12.32.pngImage Added

  3. Once happy with you configurations, press “Get New Access Token”. This will generate a new access token.

...

image-20240530-094559.pngImage Removed

...

  1. Screenshot 2024-06-04 at 15.13.02.pngImage Added

  2. Press proceed. Now you will be presented with your new access token. Press “Use Token”.

    Screenshot 2024-06-04 at 15.13.17.pngImage Added

  3. Now, the token should be added to the authorization header.

  4. Update the body and query parameters with relevant parameters and send the request.

...

  1. Screenshot 2024-06-04 at 15.14.12.pngImage Added

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 in Postman.

...