URI path, including path parameters

The path is the part of the URI starting with the server URL and ending with the resource ID. In URIs that have a query component, the path is everything before the question mark (?) character. The path is a hierarchy. The forward slash (/) character indicates the hierarchical relationship between resources.

Because the forward slash character has special meaning, forward slash characters that are part of the URL path must be percent-encoded, with the code %2F representing the forward slash. For example, the following URI represents the administrative state of port 1/1/3:

URI prefix

The URI prefix is the system URL and REST API version information. This information is specific to a particular switch and REST API version and is the same for every REST API request to that switch.

Script writers often create a variable for the URI prefix. Using a variable enables the writer to update a script or use the same script logic for a different switch by updating the value of the URI prefix variable.

The URI prefix contains the following:

Server URL

The web server address of the switch.




  • https://mycompany.myswitch.com

If Virtual Switching Extension (VSX) is enabled, you can access most resources of the peer switch from this switch by inserting /vsx-peer in the URI path between the server URL and the REST API and version identifier.

For example:

REST API identifier and version

For example: /rest/v1

Path parameters

A path parameter is a part of the URI path that can vary. Typically path parameters indicate a specific instance of a resource in a collection, such as a specific VLAN in the vlans collection. The path can contain several path parameters. Path parameters are indicated by braces {}.

For example, the ArubaOS-CX REST API Reference displays the resource for specific VLAN as the following:


When you send a request for VLAN 10, the URI you provide must substitute the VLAN ID, 10, for the {id} query parameter. For example:


In the ArubaOS-CX REST API Reference, you enter the value of the path parameter in the Value field of the id parameter.