Import and configure Postman files - Intergraph Smart Instrumentation - 2.3.12 - Training - Intergraph

Intergraph Smart Instrumentation Web API Tutorial

Language
English
Product
Intergraph Smart Instrumentation
Subproduct
Web API
Search by Category
Training
Smart Instrumentation Web Version
2.3

This tutorial uses two Postman files: one defines a Postman environment called SITrainingPostmanEnvironment and the second is a Postman collection called SITutorialPostmanCollection. The SITrainingPostmanEnvironment contains a set of variables used by the queries contained in the SITutorialPostmanCollection.

Download and save two JSON files from the Attachments tab on the side bar to a folder you can access later: SI_WS_Tutorial 2.3.12.postman_collection.json and SITrainingPostmanEnvironment 2.3.json.

You can search for "collection" and "environment" in the Postman online documentation to learn more about how these Postman features work.

You must configure values for the variables in the TrainingEnv environment based on details specific to your local environment. These include configuration details for your Smart Instrumentation API, such as the instance of the Smart API Manager being used, Site and PlantGroup, and so forth.

Smart API Manager is a lightweight API management system developed by Hexagon that contains a security token service. The security token service issues access tokens (required to make calls to the Smart Instrumentation API). Your Smart Instrumentation API must be registered with a specific instance of Smart API Manager. You must have access to information in Smart API Manager to configure the environment variables.

The next step to working with tutorial is to import the two files into postman.

The Postman screen captures may vary depending on the version you have installed.

  1. Select Manage Environments in the top-right corner of Postman.

  2. In the Manage Environments window, select Import.

  3. Select Choose Files.

  4. Navigate to the downloaded JSON file: SITrainingPostmanEnvironment and then select Open.

  5. Select TrainingEnv, to see the list of variables and values.

  6. Select and define the relevant values in the CURRENT VALUE column, as appropriate for your environment. The values displayed are only an example.

baseUri

The base URI for the web server where your Smart InstrumentationWeb API is hosted. This value must include a forward slash (/) at the end.

resourceID

The Resource Identifier for the Smart Instrumentation API (log into Smart API Manager and select the API from the grid to get this value).

samServerUri

The base URI for the web server where Smart API Manager is hosted.

A forward slash (/) must be included after the name.

samUserName

The user name for a local user in Smart API Manager. This user must be a member of a Group configured for access to the API.

samPassword

The password for the specified user.

samClientId

The Client ID for a Smart Client registered in Smart API Manager with the Resource Owner Authorization Flow.

For this tutorial we have included a generic samClientId.

samClientSecret

The Client Secret for the specified Smart Client ID.

For this tutorial we have included a generic samClientSecret.

SiteId

The Smart Instrumentation database for the connection. You can supply the SiteId later, based on the Get Sites request.

PlantGroupId

The Smart Instrumentation domain name within the selected site. You can supply the PlantGroupId later, based on the Get PlantGroup request.

versionNumber

The API’s version number. (corresponds to the last segment value of the API URL.)

token

The access token value used to secure access to the Smart Instrumentation API resources. The value is populated automatically when you run the Get Token request.

  1. Select Update button, and then close the Manage Environments window.

  2. Select the drop-down menu in the upper right corner of Postman and select TrainingEnv.

Import a Collection

The sample requests are grouped together in a Postman Collection, which you must import into Postman.

  1. On the menu bar, select IMPORT.

  2. From the IMPORT window, select Choose Files, and navigate the downloaded file SITutorialPostmanCollection.

  3. Select Open.

A new folder named SI_WS_Tutorial is added to the Collections tab, containing the sample requests.