Example 2: GET the full set of user parameters
The following example assumes that the user has successfully logged onto the unit, received the session id
and set it to the variable token. In addition, it is assumed that the IP of the unit is 192.168.0.1. You must
change the IP to the specific unit IP in use. The following example retrieves all of the user settings.
curl -X GET -i -H "Accept: application/json" -H "X-SESSION-ID: $token" -k
"https://192.168.0.1/ws/v2/service_cfg/user"
If successful, the following is an example of the return body:
"user": {
"lossofinput": "No Output"
}
Example 3: GET a specific user parameter
The following example assumes that the user has successfully logged onto the unit, received the session id
and set it to the variable token. In addition, it is assumed that the IP of the unit is 192.168.0.1. You must
change the IP to the specific unit IP in use. The following example retrieves one specific parameter value
from the user settings.
curl -X GET -i -H "Accept: application/json" -H
"X-SESSION-ID: $token" -k "https://192.168.0.1/ws/v2/service_cfg/user/
lossofinput"
If successful, the following is an example of the return body:
"user": {
"lossofinput": "No Output"
}
Disaster Recovery (D/R) Configuration API
This section describes the disaster recovery commands.
Disaster Recovery (D/R) Global Configuration Command
Table 215: Command Details
Description
Command Detail
https://192.168.0.1/ws/v2/service_cfg/dr/global
Command URL
Allows set or get of D/R global configuration.
Command Information
GET, POST
HTTP Methods
Read, Write
Access Type
User, Admin
Access Level
All D/R global Settings
GET "https://192.168.0.1/ws/v2/service_cfg/dr/global"
Single D/R global Setting, for example,
GET "https://192.168.0.1/ws/v2/service_cfg/dr/global?enable"
GET Syntax
Cisco D9800 Network Transport Receiver Version 2.75 RESTful Web Services API Reference Guide
258
API Definitions
Disaster Recovery (D/R) Configuration API