Import your environment and request collection - Intergraph Smart Electrical - 2.1 - Help - Intergraph

Intergraph Smart Electrical Web API Help

Language
English
Product
Intergraph Smart Electrical
Subproduct
Web API
Search by Category
Help
Smart Electrical Web Version
2.1

Environments in Postman allow you set constant values for keys used within requests. You can then edit and manage the values in one place and use them in multiple requests and in multiple locations. You can create your own environment; however, for the purpose of this document, we created an environment that is comprised of several keys, which we frequently use in our requests. This environment and the request collection are saved as JSON files for you to import.

Download the environment and collection JSON files

  1. Click the Attachments tab in this document, containing 2 attachments.

  2. Download the files:

    • Sample environment: TrainingEnvSEL.postman_environment.json

    • Request collection: Demo Smart Electrical Web API 2.1.postman_collection.json

    It is recommended that you download both files to the same folder location, as they can then be imported together.

Import the files into Postman

The sample queries are grouped together to create a collection, which you need to import into Postman as follows:

  1. In the top bar, click the Import button.

  2. From the Import window, do one of the following:

    • Drag and drop the files into the window.

    • Click Upload Files and navigate to the appropriate file location.

    The selected files are shown in the window:

    Import_JSON_files

  3. Click Import.

    A new collection named Demo Smart Electrical Web API 2.1 containing our sample requests is added to the Collections tab and the TrainingEnvSEL environment becomes available from the Environments tab.

View or edit the variables in an environment

  1. At the left bar in Postman, click the Environments tab.

  2. Select the TrainingEnvSEL environment to see the list of keys and values.

  3. Add or edit the relevant values in the CURRENT VALUE column, as appropriate for your environment. The values displayed in the red box are only examples.

    For a full list of keys and how to obtain their values, see Key values for Postman used in this tutorial.

    SHARED Tip The values of the samServerUri and resourceID keys can be found by running the 01.01 Description request (for details, see GET Requests to Smart Electrical Metadata) and copying the TokenIssuerUri and TokenAudience values respectively from the response.

  4. When done, click Save.