HomeGuidesAPI Reference
GuidesAPI ReferenceGitHubAirheads Developer CommunityLog In
Guides

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

  1. Go to the AOS-CX Postman Workspace. You can do this from the Postman website or application, which can be installed from here.
  2. 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.
  1. 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
Forking the AOS-CX Collection and AOS-CX ENV environment

Forking the AOS-CX Collection and AOS-CX ENV environment


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:

  1. Within your personal workspace, select the Environments tab and add values for the following variables in the AOS-CX ENV:
VariableDescription
switch_ipIP Address of the AOS-CX Switch. This IP address has to be reachable from the Postman application. Eg. https://10.10.223.180
versionVersion of the AOS-CX API that you would like to use. Ex. v10.13, v10.12, latest
usernameUsername of user with administrator role on the AOS-CX Switch
passwordPassword 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
  1. Once the valid values are set, save the environment, and please set the AOS-CX ENV as the active environment for your workspace.
  2. 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.
Setting AOS-CX Switch's variables in the AOS-CX ENV and then making API calls to the switch from Postman

Setting AOS-CX Switch's variables in the AOS-CX ENV and then making API calls to the switch from Postman