Testing the Portnox Cloud REST API
In this topic, you will learn how to test the Portnox™ Cloud REST API by using the interface in the Portnox Cloud web portal.
Authorize with the Cloud API
To use the Portnox Cloud API, you must first authorize with the API. Without authorization, all other API operations will fail. In this section, you will learn about two ways to authorize.
-
Option 1: Authorize using your Portnox Cloud administrator account.
-
Option 2: Authorize using your API key.
Test the Portnox Cloud REST API
In this section, you will perform example operations using the Portnox Cloud REST API to see how it works.
This example shows how to use the /api/device/list operation to fetch a list of accounts and their devices.
Warning: In this example, we selected an operation that does not change the state of the tenant. However, all
actions performed in the Portnox Cloud REST API test interface ( ) are actual API operations. All operations that change states, such as creation or deletion operations,
actually change the configuration of your tenant. Be careful when executing these operations to test the API.
-
Click on the Device Operations heading to expand this section and then click on the
/api/device/list tile to expand this operation.
- Optional: You can click on section headings above the Parameters section to see code samples in different languages.
-
In the Parameters section, click on the Try It Out button.
-
In the request section, click on the Model link to learn how to
modify values in the request, then click on the text field and modify values as needed, and finally click on the
Execute button.
-
Analyze the Responses section.