Chapter 3
Getting Started
Getting Started
Before getting started, note the prerequisites listed below and develop a basic understanding of the
interface used and the curl commands used to login and logout of an Instant AP.
Prerequisites
nComplete understanding of the configuration hierarchy.
nKnowledge of the CLIs is required for the first time as all objects are based on the equivalent CLIs.
nThe user can run curl commands from any machine supporting curl configuration.
Ensure to prefix escape character ( \ ) when including - \n, \r, double quotes, or any other special characters – as
part of JSON input parameter values.
Enabling or Disabling RESTAPIon the Instant AP
The RESTAPIfunction is disabled by default. To access the API, you must first enable it using the Instant
CLI. RESTAPIconfiguration is supported on both cluster and standalone modes. In the cluster mode,
only the master Instant AP will provide the RESTAPIaccess.
The below CLIcommand enables the RESTAPIon a master or a standalone Instant AP:
(Instant AP)(config)# allow-rest-api
(Instant AP)(config)# end
(Instant AP)# commit apply
The below CLIcommand disables the RESTAPIon a master or a standalone Instant AP:
(Instant AP)(config)# no allow-rest-api
(Instant AP)(config)# end
(Instant AP)# commit apply
Interface
The interface used to access the configuration elements on Instant AP is HTTPS. HTTPS is used because
it provides transport layer security, and hence the passwords and other secret information can be sent
over in plain text without worrying about anyone interfering.
Login
To access any configuration element—whether it is action,configuration, or monitoring, the user first
has to login to the Instant AP.
The following is a sample CURL command used to log in to the master Instant AP:
curl "https://<Master-iap-ip>:4343/rest/login" -H "Content-Type: application/json" --
data '{"user": "<username>", "passwd": "<password"}' -–insecure
The following is a sample CURL command used to log in to the standalone Instant AP:
curl "https://<Standalone-iap-ip>:4343/rest/login" -H "Content-Type: application/json" -
-data '{"user": "<username>", "passwd": "<password"}' -–insecure
Aruba Instant 8.11.1.x 8