Making a Smart API Request - EcoSys - Administration & Configuration - Hexagon

EcoSys Smart API

Search by Category
Administration & Configuration
EcoSys Version

After EcoSys is configured, you can use any API tool to access EcoSys Smart API. The following steps describe how to make a request to get a Token and then use the Token to make a request for data from EcoSys. These steps will continue to use Okta as the example oAuth provider.

The following calls can be made in any API tool such as Postman, Swagger, and so on. The following steps use Postman.

Getting a Token from the oAuth Provider

To get an access token using Postman,

  1. Select the POST HTTP method.

  2. Set the URL to the token providers Token URL.

    An example of the URL when using OKTA is

  3. Click the Body tab below the URL address.

  4. Select the x-www-form-urlencoded content type.

  5. Enter the following key/value pairs:

    • grant_type - Enter client_credentials

    • client_id - Enter the Client ID as it is set in the oAuth provider

    • client_secret - Enter the Client Secret as it is set in the oAuth provider

    • Scope - Enter the Scope as it is set in the oAuth provider.

  6. Click Send.

    The access token will be displayed in the response body. For example, "accesss_token": " __access_token_string__ "

    The "__access_token_string__" is a long token which will be used in the API request to EcoSys.

Calling EcoSys Smart API

  1. In PostMan, select the GET HTTP method.

  2. Set the URL to https://<server name>/ecosys/smartapi/Versions

    This query returns all Versions in the system.

  3. Click the Headers tab, create a new key/value entry.

    • Key - Authorization

    • Value - Type Bearer <__access_token_string__ >

      For example: Bearer eyJraWQi

  4. Click Send and all the Versions in EcoSys will be retrieved.