Using Postman with the Control API

Postman is a popular tool with our customers for interacting with APIs. This article will help you to configure Postman to use the Workspot Control API.

Prerequisites

  • Administrative access to Workspot Control.

  • Workspot API feature should be enabled.

Configure Postman

  • Click on “Collections” from the left pane and click on “+” to Create a new collection.

  • Select “Blank Collection” and give the new collection a name, such as “Workspot”:

  • Click on “…” and then “Add request,” and give a name to the request, such as “LicenseInfo.”

  • On the right side a section will open with Params, Authorization Headers, and other Tabs. Click on the Authorization tab and select OAuth2.0:

  • Go to the Configure New Token section and provide the required details:

    • Enter a convenient name in the Token Name field

    • Select “Grant Type” as “Password Credentials”

    • Set the “Access Token URL” to the contents of the “URL” field shown on Workspot Control’s “Setup > API” page (shown below).

    • Set the “Client ID” field to the contents of the “Client ID” field of Control’s “Setup > API” page.

    • Set the “Client Secret” field to the contents of the “Client Secret” field of Control’s “Setup > API” page (click the “Reveal” button to show the full Client Secret).

    • Enter the email (username) and password of a Workspot Control Administrator.

  • Click “Get New Access Token.” 

  • Click “Use Token.”

Note: The token will remain valid for 60 minutes, after which you need to click “Get New Access Token” and “Use Token” again.

Example of Using the Workspot Control API

In a browser, go to the Workspot Control API:

From the Control API, capture the appropriate commands to paste into Postman:

  • Click on “api-controller” to see the list of API commands:

  • To get the request URL, Click “Try Out” and then “Execute.”

  • Copy the Request URL, paste it into the Postman, and click on Send.

  • Postman will send the request with the appropriate credentials for your Workspot deployment

  • The API will send the response, which will be displayed in the Body section as shown below:

Related Document

Using the Workspot Control API.