> For the complete documentation index, see [llms.txt](https://docs.nalpeiron.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.nalpeiron.com/developers/postman-configuration.md).

# Postman Configuration

To set up Postman to use the <code class="expression">space.vars.product\_name\_full</code> <code class="expression">space.vars.space\_id === 'Documentation' ? 'Management ' : ''</code>API and to test your setup, do the following:

1. Download the OpenAPI Specification document at the top of this file.
2. Launch Postman. The rest of these instructions pertain to Postman, unless otherwise specified.
3. From the left sidebar, at the top, select the application menu, and then select **Import**. On the next screens, select the file you just downloaded.

   ![Select the Import option](/spaces/dIv59m1KSfB3sHCzuUZq/files/HYwA7w0GiTR1kTyQ9ZdW)
4. Select **OpenAPI 3.0 Specification with a Postman Collection**, and then select **Import**.

   ![Import the file as an OAS with a Postman collection](/spaces/dIv59m1KSfB3sHCzuUZq/files/rirMVijXfkQJFpRMIgix)
5. From the left side bar, select **Collections** > **Zentitle2 Management API**.
6. The screen changes, and tabs now appear in the workspace. Select the **Authorization** tab, and then select **No Auth**.

   ![Select the Authorization tab and No Auth](/spaces/dIv59m1KSfB3sHCzuUZq/files/prpwTRrPqm0JBFOMP71i)
7. Select the **Scripts** tab, and then select **Pre-request**.

   ![Select the Scripts tab and then select Pre-request](/spaces/dIv59m1KSfB3sHCzuUZq/files/smiX2nCozMgIhwfdEhJP)
8. Paste the following script into the text box:

   ```javascript
   pm.environment.set("baseUrl", pm.environment.get("orionApiUrl"));

   var setAuthHeaders = () => {
       pm.request.headers.upsert({key: 'N-TenantId', value: pm.environment.get("tenantId") });
       pm.request.headers.upsert({key: 'Authorization', value: pm.environment.get("oauth_token") });
   };

   if (pm.environment.get("token_time") && pm.environment.get("token_time") > Date.now()) {
       setAuthHeaders();
       return;
   }

   var body = 'grant_type=client_credentials'
       + '&client_id=' + pm.environment.get("clientId")
       + '&client_secret=' + pm.environment.get("clientSecret");
   pm.sendRequest({
       url: pm.environment.get("oauth_url"),
       method: 'POST',
       header: {
           'Content-Type': 'application/x-www-form-urlencoded',
           'Accept': 'application/json'
       },
       body: {
           mode: 'raw',
           raw: body
       }
   }, function (err, res) {
       var response = res.json();
       pm.environment.set("oauth_token", 'Bearer ' + response.access_token);
       pm.environment.set("token_time", Date.now() + response.expires_in * 1000);

       setAuthHeaders();
   });
   ```
9. Perform the following steps in the NGP to download your JSON configuration file:
   1. From the left navigation, select **administration**.

      ![Select administration option](/spaces/dIv59m1KSfB3sHCzuUZq/files/lG94iPSZTa5Iki86ceSL)
   2. Select the left navigation again, and then select **API Credentials**.

      ![Select API Credentials from menu](/spaces/dIv59m1KSfB3sHCzuUZq/files/EWd6WYF1dlxEXQO8wjvl)
   3. The **API Credentials** page appears. Select the **Management API** tab, and then select **Add API Client**.

      ![Select Add API Client](/spaces/dIv59m1KSfB3sHCzuUZq/files/PDb0O7t3hpBhCBG50RL5)
   4. In the window that appears, enter a memorable name for the **Client ID** (for example, "postman-config"), and then select **Save**, but don't close the sidbar.
   5. Select **Download Postman environment configuation**, after which you return to Postman for the rest of the instructions.
10. Once again (in Postman, where we'll stay for the rest of the instructions), from the application menu in the left side bar, select **Import**. This time, select the environment configuration JSON file that you just generated and downloaded from the NGP.
11. Confirm that your environment imported successfully by selecting it from the **Environments** section in the left side bar. After selecting the environment, several environment variables should appear in your workspace, including `clientId` and `clientSecret`.

    ![Verify that the environment successfully imported](/spaces/dIv59m1KSfB3sHCzuUZq/files/3XMbwxDyak9HdiLLyTIR)
12. Use the environment selector in the toolbar to select the newly imported environment.

    ![Select the environment](/spaces/dIv59m1KSfB3sHCzuUZq/files/8uIhHl6taFZvvTFNXyKU)

    The environment selector changes to reflect the new environment.

    ![Environment selector shows newly selected environment](/spaces/dIv59m1KSfB3sHCzuUZq/files/ially7uQeEfRjE1oZYPD)
13. In the left side bar, expand **Collections** so that the endpoints are exposed. In the **products** folder, select **Get a product list**.

    ![Select the Get a product list endpoint](/spaces/dIv59m1KSfB3sHCzuUZq/files/152LR45hJsRtuYftHYAR)
14. The request appears in the workspace. Select **Send**.

    ![\[Request appears, with the beginning that needs to be edited\]](/spaces/dIv59m1KSfB3sHCzuUZq/files/F0kBQPgm5VBz12kDtCKD)

    If everything works correctly, a 200 response appears at the bottom of your screen.

    ![A 200-level response appears](/spaces/dIv59m1KSfB3sHCzuUZq/files/5rkDPYiCxSGQb0h923yQ)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.nalpeiron.com/developers/postman-configuration.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
