API Swagger Interface
Accessing API Swagger documentation page
HPE Aruba Networking Central provides a link under its API Gateway section to its Swagger web interface which lists all the available Central APIs for the customers.
![124fa42-Swagger.png 996](https://files.readme.io/895aef2-124fa42-Swagger.png)
Clicking on the API GW link shown in the figure above opens API Gateways swagger based interface
Note
The API GW link is unique based on which geographical cluster the customer's HPE Aruba Networking Central account resides on.
Below is the screenshot of Central API's swagger UI interface.
It has the following main features
- Lists all the supported APIs
- Required parameters for an API Endpoint
- Expected API response sample and model schema
- Try out an API endpoint in the HPE Aruba Networking Central and view the results.
![dc9c92e-Screen_Shot_2020-03-02_at_6.17.34_PM.png 2854](https://files.readme.io/dd6a102-dc9c92e-Screen_Shot_2020-03-02_at_6.17.34_PM.png)
The API Gateway's swagger interface can be used to try out different APIs
Trying out an API Endpoint
In order to try out the API using the API Gateway swagger interface, an access token needs to be provided in the Token textbox in the left panel. If you don't have an access token, refer to the previous section Obtaining Access Token
In this section, let's try out the Refresh Token API using Swagger web Interface.
For API reference click Refresh Token API
- Choose Refresh Token API from the URL dropdown
- Enter client_id, client_secret, grant_type and refresh_token in the respective fields
- client_id and client_secret are obtained in the "Creating Application & Token" section
- refresh_token value is obtained by downloading the access token JSON as mentioned in the previous section "Obtaining Access Token"
- Click Try button.
![Screen Shot 2020-03-10 at 5.10.49 PM.png 2200](https://files.readme.io/73013e2-Screen_Shot_2020-03-10_at_5.10.49_PM.png)
Refresh Token API in Swagger Interface
You can view the result with a pop-up window as shown below
![Screen Shot 2020-03-10 at 5.17.01 PM.png 986](https://files.readme.io/01f5594-Screen_Shot_2020-03-10_at_5.17.01_PM.png)
Refresh Token API response in Web Interface
Note
After making a successful call to Refresh Token API, the existing access token which was refreshed will be invalid. You need to use the access token received as a response for this request. You can also obtain this token at later point of time by downloading it from API Gateway.
In this section, we learnt how to obtain access token using API Gateway and trying out refresh token API from swagger interface.
Updated about 2 months ago
In the next section, let's learn about obtaining access token via API requests