Import and configure Postman files - Intergraph Smart Instrumentation - Version 2.3.4 - 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.4

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 these two .json files, SI_WS_Tutorial 2.3.4.postman_collection.json and SITrainingPostmanEnvironment 2.3.json from the Attachments tab on the side bar and save them to a folder you can access later.

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, for the instance of Smart API Manager being used, Site and PlantGroup, etc.

Smart API Manager is a lightweight API Management system developed by Hexagon PPM 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. Click the gear icon in the top-right corner of Postman.

  2. In the Manage Environments window, click the Import button.

  3. Click the button.

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

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

  6. Select and fill in 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 you connect to. 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.

  7. Click the button, and then close the Manage Environments window.

  8. Click 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, click the Import button.

  2. From the IMPORT window, click , and navigate the downloaded file SITutorialPostmanCollection.

  3. Click Open.

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