AOS-CX REST API reference summary

The following information is intended as a quick reference for experienced users. Values are not configurable unless noted otherwise.

Switch REST API access default

Disabled

Switch REST API read/write access default

Read-only

Enabling access to the Web UI and REST API

To enable access on the specified VRF, use the following CLI command from the global configuration context: https-server vrf <VRF-NAME>

For example:

switch(config)# https-server vrf mgmt

Setting the REST API access mode to read/write

Use the following CLI command from the global configuration context: https-server rest access-mode read-write

For example:

switch(config)# https-server rest access-mode read-write

Showing the REST API access configuration

Use the following CLI command: show https-server

For example:

switch(config)# show https-server

HTTPS Server Configuration
----------------------------

 VRF               : default, mgmt
 REST Access Mode  : read-only

AOS-CX REST API Reference URL:

https://<IP-ADDR>/api/

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

For example: https://192.0.2.5/api/

REST API version

Switch software version REST API version
AOS-CX 10.00 through 10.03 v1

Protocol

HTTPS

Port

443

Request and response body format

JSON

Session idle timeout

20 minutes

Session hard timeout

Eight hours, regardless of whether the session is active.

Authentication

Session cookie from successful HTTPS login request.

HTTPS client sessions

  • Maximum of 48 sessions per switch.

  • Maximum of three concurrent client sessions per user.

  • The same session cookie is shared across browser tabs and, depending on the browser, multiple browser windows.

  • The same session cookie is not shared across devices and scripts.

    For example, if a user logs into the Web UI from a laptop, again with a tablet, and then uses the same user name in a curl command, that user has three concurrent client sessions.

VSX peer switch access

If Virtual Switching Extension (VSX) is enabled on both switches and the ISL is up, you can access the VSX peer switch from your connected switch. To access the peer VSX switch, insert /vsx-peer in the URI path after the server URL and before the REST API and version identifier. Not supported for login, Web UI, or AOS-CX REST Reference access.

For example:

  • Accessing a VSX switch:

    https://192.0.2.5/rest/v1/…
  • Accessing its VSX peer switch:

    https://192.0.2.5/vsx-peer/rest/v1/…