REST API version

Resources, attributes, and behaviors might differ between different versions of the REST API.

The REST API version is included in the URI used in REST requests.

In the following example, the REST API version is v1:

When URIs are included in scripts, the prefix information might be declared somewhere other than in every URI used in the script.

For example, the following code specifies REST API version v1 and the management module of an Aruba 8400 switch. This code could be changed to support an Aruba 8320 switch by changing the management module resource ID to 1%2F1. By storing the version and other commonly used information in a variable, you can update the script by changing the value of the variable instead of executing a search and replace operation throughout the script.

uri1 = '/rest/v1/system/subsystems/management_module/1%2F5?' \

The version of the REST API running on the switch and the version declared in the REST request must match.

At the bottom of its window, the ArubaOS-CX REST API Reference displays the REST API version running on the switch.

For example: