General troubleshooting tips

  • Connectivity is often the first issue you encounter. Ensure that you have connected https-server to the VRF you are trying to use.

    To connect to the REST API through the management (OOBM) port, REST API access must be enabled on the management VRF. To connect to the REST API through a data port, REST API access must be enabled on the default VRF or a user-created VRF that includes that data port.

  • Most resources do not allow POST, PUT, or DELETE methods and do not display those methods in the ArubaOS-CX REST API Reference unless the REST access mode is set to read-write.

  • The JSON model of a resource can vary by method used. The JSON data you receive from the GET method is not the same as the JSON data you can or must provide with the POST or PUT methods:

    • The GET method model contains all the attributes.

    • The POST method model contains only the configuration attributes.

    • The PUT method model contains only the mutable (changeable) configuration attributes. If you do not provide all the mutable attributes in the request body of the PUT request, those attributes you do not provide are set to their defaults, which could be empty. If you attempt to provide an immutable attribute in a PUT request, an error is returned.

    You can use the ArubaOS-CX REST API Reference to view information about the supported methods and resource models. Use the GET method with the selector=configuration parameter to get only the configuration attributes of a resource. Using the REST v10.04 API, you can also use the GET method with the selector=writable parameter to get only the mutable configuration attributes of a resource.

  • Resources, attributes, and behaviors might differ between different versions of the switch software.

    For example:

    The bridge resource was eliminated from the URI path of REST v1 URIs beginning with ArubaOS-CX 10.03:

    • Example of getting the list of VLANs for a switch running ArubaOS-CX version 10.02:

      GET "https://192.0.2.5/rest/v1/system/bridge/vlans"
    • Example of getting the list of VLANs for a switch running ArubaOS-CX version 10.03:

      GET "https://192.0.2.5/rest/v1/system/vlans"

    If you are getting errors when making requests to switches with different software versions, use the ArubaOS-CX REST API Reference on each switch to compare the URI paths and attributes for the resource. You might need to alter your code to handle the different software versions.

  • Resources, attributes, and behaviors might differ between different versions of the REST API, and a switch supports access through multiple versions of the REST API.

    You can use a GET request to the rest resource to get information about the REST API versions supported on the switch and the latest REST API version on the switch.

    For example:

    GET "https://192.0.2.5/rest"
  • Different switches have different hardware and features. For example, the management module resource ID is 1/1 for some switches, and 1/4 or 1/5 for other switches. To get information about the switch model, use the GET method request with the URI for the platform_name system attribute.

    For example:

    GET "https://192.0.2.5/rest/v1/system?attributes=platform_name"

    The following is an example of a response body for an Aruba 8320 switch:

    {
      "platform_name": "8320"
    }

    The following is an example of a response body for an Aruba 8400 switch:

    {
      "platform_name": "8400X"
    }
  • You can obtain additional platform-specific information through GET requests for product information attributes or subsystem collections.

    Aruba 8400 switch examples:

    • Example request (REST v1):

      GET "https://192.0.2.5/rest/v1/system/subsystems"

      Example response (REST v1):

      [
        "/rest/v1/system/subsystems/chassis,base",
        "/rest/v1/system/subsystems/line_card/1%2F3",
        "/rest/v1/system/subsystems/management_module/1%2F5"
      ]
      
    • Example request (REST v10.04):

      GET "https://192.0.2.5/rest/v10.04/system/subsystems"

      Example response (REST v10.04):

      {
        "chassis,1": "/rest/v10.04/system/subsystems/chassis,1",
        "line_card,1/3": "/rest/v10.04/system/subsystems/line_card,1%2F3",
        "management_module,1/5": "/rest/v10.04/system/subsystems/management_module,1%2F5"
      }
    • Example request:

      GET "https://192.0.2.5/rest/v1/system/subsystems/chassis,base?attributes=product_info"

      Example response:

      {
        "product_info": {
          "base_mac_address": "00:00:5E:00:53:00",
          "device_version": "",
          "instance": "1",
          "number_of_macs": "512",
          "part_number": "JL375A",
          "product_description": "8400 8-slot Chassis/3xFan Trays/18xFans/Cable Manager/X462 Bundle",
          "product_name": "8400 Base Chassis/3xFT/18xFans/Cbl Mgr/X462 Bundle",
          "serial_number": "SG00A2A00A",
          "vendor": "Aruba"
        }
      }

    Aruba 8320 switch examples:

    • Example request (REST v1):

      GET "https://192.0.2.5/rest/v1/system/subsystems

      Example response (REST v1):

      [
        "/rest/v1/system/subsystems/chassis/base",
        "/rest/v1/system/subsystems/line_card/1%2F1",
        "/rest/v1/system/subsystems/management_module/1%2F1"
      ]
    • Example request (REST v10.04):

      GET "https://192.0.2.5/rest/v10.04/system/subsystems

      Example response (REST v10.04):

      {
        "chassis,1": "/rest/v10.04/system/subsystems/chassis,1",
        "line_card,1/1": "/rest/v10.04/system/subsystems/line_card,1%2F1 ",
        "management_module,1/1": "/rest/v10.04/system/subsystems/management_module,1%2F1"
      }
    • Example request (REST v10.04):

      GET "https://10.102.254.250/rest/v10.04/system/subsystems/chassis,1?attributes=product_info"

      Example response:

      {
        "product_info": {
          "base_mac_address": "00:00:5E:00:53:01",
          "device_version": "",
          "instance": "1",
          "number_of_macs": "74",
          "part_number": "JL479A",
          "product_description": "8320",
          "product_name": "8320",
          "serial_number": "TW00000000",
          "vendor": "Aruba"
        }
      }
      
  • The words "port" and "interface" have meanings that are different from other network operating systems. In the ArubaOS-CX operating system:

    • A port is the logical representation of a port.

    • An interface is the hardware representation of a port.

  • You can enable debugging logs by using the debug command. The module name is rest. You can specify all severity log levels or a minimum severity log level.

    Example specifying all severity log levels:

    switch# debug rest all

    Example specifying a minimum severity log level of error:

    switch# debug rest all severity error