Constructing a URI using the ArubaOS-CX REST API Reference

Procedure
  1. Log into the switch from the ArubaOS-CX REST API Reference:
    1. Use a supported browser to access the switch at: https://<IP-ADDR>/api/

      <IP-ADDR> is the IP address or hostname of your switch.

    2. Expand the Login resource by clicking the resource name, /login, or by clicking Expand Operations.
    3. Enter your user name in the value of the username parameter.
    4. Enter your password in the value of the password parameter.
    5. Click Submit.
  2. To expand the possible endpoints of a resource, click the resource name.

    For example, CPU utilization is a kind of resource utilization, which is part of the subsystems resource collection:

    Subsystem resources and methods listed in REST API Reference
  3. Click the endpoint in the GET method to expand the collection.
    Subsystem GET method displayed in REST API Reference
  4. Navigate to the Parameters section and select the attribute or attributes you want to display.
    GET parameters listed in REST API Reference

    You can select multiple attributes:

    • To select a range of attributes, click the first attribute, then press Shift, and then click the last attribute in the range you want to select.

    • To select attributes that are not adjacent in the list, press Ctrl, then click each attribute you want to select.

  5. Click Submit.

    The displayed information expands to show the curl command equivalent, the request URL, and the response body. In the following example, the IP address of the switch is hidden by the gray box, and the response body is not shown.

    GET method in REST API Reference showing curl and URL examples
  6. If you are specifying a specific component of the attribute, view the Response Body and record the exact name of the attribute component to add to the query portion of the URI.

    For URIs specifying monitors only, you can specify components within attributes by using a "dot" notation after the attribute name.

    For example, In the Response Body, the CPU utilization is part of the resource_utilization resource. You can specify that only the CPU resources be monitored by adding .cpu after the attribute name. For example: resource_utilization.cpu.

    Response body in REST API Reference showing CPU resource

The resulting example URI for accessing CPU utilization through the REST API is the following:

https://192.0.0.5/rest/v1/system/subsystems?attributes=resource_utilization.cpu