Configuring the Postman REST API Client

Zscaler supports the macOS, Windows, and Linux versions of the Postman REST API app. To learn more about the app and its features, refer to the Postman documentation.

If you already have Postman installed and configured, you can download the latest version of the Workflow Automation API Postman collection files from any article within the Reference Guide.

Installing and Configuring Postman for macOS, Windows, or Linux

To install and configure Postman:

  1. Go to the Postman website, download, and install the app for your OS (i.e., macOS, Windows, or Linux).
  2. After installation, open the app and log in to your account. If you do not have an account, you can create one.
  3. Download the latest version of the Workflow Automation API Postman collection file from the Reference Guide.
  4. From the main window, click Import. Alternatively, from the top menu, you can go to File > Import.

  1. In the Import window that appears, drag and drop the .postman_collection file into the window or click Files and upload it from your local.

After the file is imported, a new folder, Workflow Automation API (e.g., workflow-automation-api-postman-collection), is displayed within Collections.

  1. Next to the environment drop-down menu in the upper right, ensure that No Environment is selected, then click the Environment quick look icon.
  2. Click Add.

  1. On the New Environment tab that appears, complete the following steps:
    1. Enter a descriptive name for the environment (e.g., Zscaler Test Environment).
    2. For Variable, enter url.
    3. For Type, leave as default.
    4. For the Initial Value, enter https://api.<us1.zsworkflow.net>/dlp/v1, where <us1.zsworkflow.net> is the cloud provisioned for your organization.
    5. Click Save.

You can then select this environment (e.g., Zscalerr Test Environment) from the drop-down menu in the upper right. To learn more, refer to the Postman documentation.

Authenticating a Session in Postman

After installing and configuring the Postman app, try to authenticate a session.

  1. Log in to the Workflow Automation Admin Portal using your API admin credentials. To learn more, see Getting Started.
  2. Copy the Key ID and the Key Secret from the API Keys page.
  3. In the Postman app:
    1. Go to File > Settings.

  1. Under General, turn off SSL certificate verification.

  1. Go to POST get-token-by-api-key in the Postman collection, you imported previously.
  2. Click Body and replace your key_id and key_secret you copied in Step 3.
  3. Click Send.

Screenshot of the POST request to authenticate API with the API key in the Postman app

Close

If your API key was set up correctly, a Status 200 OK message with the authorization token is returned.

Making an API Call in Postman

Try making an API call using Postman. In the following example, we download information about a specific DLP incident using /incidents/transactions/{transcationId}:

  1. Make sure that you can authenticate successfully.
  2. Go to GET get-dlp-incidents-by-transaction-id. Ensure that you replace the {transcationId} in the GET request with the actual transaction ID.

  1. In the Authorization tab, verify the Type is Bearer Token, and that the correct authorization token has been passed.
    1. Copy the bearer token you received from successful API authentication.
    2. Paste the bearer token into the Token field.

  1. Click Send.

You should receive a Status 200 OK message and a response.

By default, the session is terminated after 300 seconds or 5 minutes.