REST API access modes

The REST API supports two access modes:

  • read-only (default)

  • read/write

You can enable write support (POST, PUT, and DELETE methods) using the https-server rest access-mode read-write CLI command from the global configuration (config) context.

Read-only access mode

In the read-only access mode:

  • Most switch resources support GET methods only, but some resources allow PUT or POST methods to be used even when the REST access mode is read-only.

    For example, you can use POST to log into the switch, use PUT to upload a new running configuration, or use POST to upload a new firmware version.

  • For most switch resources, the ArubaOS-CX REST API Reference does not show any write methods (POST, PUT, and DELETE) the resource might support. To show those write methods, read/write mode must be enabled.

Read/write access mode

In the read/write access mode:

  • The ArubaOS-CX REST API Reference shows most of the supported read and write methods for all switch resources.

  • The REST API can access and change every configurable aspect of the switch as modeled in the configuration and state database.

    CAUTION:

    The REST API is powerful but must be used with extreme caution: No semantic validation is performed on the data you write to the database, and configuration errors can destabilize the switch.