AOS-CXREST 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

8320, 8325, 8360, 8400 Switches Series: Disabled

6200, 6300, 6400 Switches Series: Enabled on themgmtVRF

6100 Switch Series: Enabled on thedefaultVRF

Switch REST API default access mode

Read-write

Enabling access to the Web UI and REST API

CLI command:

https-server vrf

Example:

switch(config)#https-server vrf mgmt

Setting the REST API access mode to read-write

CLI command:

https-server rest access-mode read-write

Example:

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

Showing the REST API access configuration

CLI command:

show https-server

Example:

switch(config)#show https-serverHTTPS Server Configuration ---------------------------- VRF : default, mgmt REST Access Mode : read-write

AOS-CX REST API Reference URL:

REST v10.04 API:https:///api/v10.04/

REST v1 API:https:///api/v1orhttps:///api/

is the IP address or hostname of your switch.

Example:https://192.0.2.5/api/v10.04/

REST API versions and switch software versions

REST API version Switch software version
v10.04 AOS-CX10.04 and later
v1 AOS-CX10.00 and later

美联社得到休息I version information from a switch

Method and URI to get the REST API versions supported on the switch:

GET "https:///rest"

is the IP address or hostname of your switch.

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

  • 最多48会话/开关。

  • Maximum of six 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-peerin the URI path between the server URL and/rest. Not supported for login, Web UI, orAOS-CXREST API Reference access. For more information about VSX, seeVSX peer switches and REST API access.

For example:

  • Accessing a VSX switch:

    https://192.0.2.5/rest/v10.04/…
  • Accessing its VSX peer switch:

    https://192.0.2.5/vsx-peer/rest/v10.04/…