Postman Collection
Postman is a popular tool used to test HTTP Requests to API endpoints. AOS-CX offers a Postman collection and environment that you can use to test REST APIs with AOS-CX switches which is available here.
Getting Started with AOS-CX Postman Collection
- Go to the AOS-CX Postman Workspace. You can do this from the Postman website or application, which can be installed from here.
- Within the workspace, click on the AOS-CX collection which is pinned on the workspace's overview page. This will take you to the AOS-CX collection and set the AOS-CX ENV as the active environment of the collection.
Postman Definitions
- A collection is a set of API endpoints or requests, along with each endpoint's authorization type, parameters, headers, request bodies, tests, and settings grouped together.
- A environment is a set of one or more variables that you can reference when sending requests or writing test script in Postman.
- Fork the AOS-CX collection and AOS-CX ENV environment to your personal Postman workspace. This will enable you to make API requests to AOS-CX switches using this Postman collection
Making API calls
Once you have successfully forked the AOS-CX collection and AOS-CX ENV environment to your personal workspace, please follow the below steps to make API calls to your AOS-CX switch with Postman:
- Within your personal workspace, select the Environments tab and add values for the following variables in the AOS-CX ENV:
Variable | Description |
---|---|
switch_ip | IP Address of the AOS-CX Switch. This IP address has to be reachable from the Postman application. Eg. https://10.10.223.180 |
version | Version of the AOS-CX API that you would like to use. Ex. v10.13 , v10.12 , latest |
username | Username of user with administrator role on the AOS-CX Switch |
password | Password of the above mentioned user. These credentials will be used to create the session cookie that will be used will be use to make API calls to the switch |
- Once the valid values are set, save the environment, and please set the AOS-CX ENV as the active environment for your workspace.
- Click on the Collections tab and select AOS-CX collection. You should now be able to make API calls to Aruba Central from your Postman Collection. The collection automatically handles the login step & stores the session cookie under the
token
variable in the AOS-CX ENV, so subsequent API calls can be made to the device until logout.
Updated 3 months ago