Examples

The following examples show how you can use curl with ArubaOS-CX REST API. The response body might vary based on the ArubaOS-CX switch series. For example, the 8320 and 6400 switches show VSX information, whereas the 6300 and 6200 switches show VSF and PoE information.

As a best practice, before you perform a GET, PUT, POST, or DELETE operation, you must login to create a session and save the cookie file by specifying the-coption with a file name. After you perform the operation, you must logout to end the session and pass the cookie file back to the switch by specifying the-boption with the same file name. The following examples assume that you are performing the step to login before performing the operations in the example and logout after performing the operations. For more information, seeAccessing the REST API using curl.

NOTE:

The request and response body in the following examples contain a truncated part of the actual data. The data that you see after running the curl commands might vary. Ellipses (…) in the response body represent data not shown in the example.