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.
Test using Postman
In this section, you will do the same test as above, but using the Postman application.
Postman is a free, GUI-based Windows application for testing APIs. Before you begin, download Postman from the official site and install it. You can register for a Postman account or run the application without an account.
Result: You receive a response from the Portnox Cloud API. You can view the response code in the Pretty tab.

Test using curl
In this section, you will do the same test as above, but using the curl application.
curl is a free application, available for many operating systems, and used to send HTTP requests and get HTTP responses from the command line. Before you begin, download curl from the official site (choose the right package for your operating system) and install it.
Result: You receive a response from the Portnox Cloud API.

















