https-server rest access-mode
Syntax
https-server rest access-mode {read-only | read-write}
Description
Changes the REST API access mode. Changing the mode to
read-write
allows POST, PUT, and DELETE operations to be called on all configurable elements in the switch configuration database.
Command context
config
Parameters
read-only
Selects the read-only mode. Write access to most switch resources through the REST API is disabled.
read-write
Selects the read/write mode. Allows POST, PUT, and DELETE methods to be called on all configurable elements in the switch database.
Authority
Administrators or local user group members with execution rights for this command.
Usage
Setting the mode to
read-write
on the REST API allows POST, PUT, and DELETE methods to be called on all configurable elements in the switch database.
The REST API in read/write mode is intended for use by advanced programmers who have a good understanding of the system schema and data relationships in the switch database.
Because the REST API in read/write mode can access every configurable element in the database, it 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.
Some switch resources allow POST, PUT, and DELETE regardless of REST API mode.
On 8320 switches, 8325 switches, or 8400 switches, the default mode is
read-only
.
Example
switch(config)# https-server rest access-mode read-write