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. In this example the audio settings are retrieved for Device 1.
curl -X GET -i
-H "Accept: application/json" -H "X-SESSION-ID: $token" -k
"https://192.168.0.1/ws/v2/service_cfg/decode/audio?right&left&ddpmode&mode&device=1&
lang&ac3comp&pmtsrc&langmenu"
If successful, the return body will be:
"decode": {
"audio": {
"device": "1",
"ac3comp": "RF Mode",
"ddpmode": "Pass",
"lang": "eng",
"langmenu": "PMT Order",
"left": "0.0",
"mode": "Stereo",
"pmtsrc": "AUD1",
"right": "0.0"
}
}
Specific audio setting arguments per given audio device can be retrieved by including the specific argument
in the URI. For example, to only retrieve the pmtscr and langmenu arguments of audio device 1, the CURL
command is:
curl -X GET -i
-H "Accept: application/json" -H "X-SESSION-ID: $token" -k
"https://192.168.0.1/ws/v2/service_cfg/decode/audio?device=1&pmtsrc&langmenu"
Example 3: Set Audio decoder langmenu option to all Audio devices
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.
This example sets the langmenu option to PMT%20Order.
The device=all must be specified in the URI for PMT%20Order case because that setting value cannot be
combined with any other "Language%20List" or "Language%20Entry" option value for other devices.
Note
curl -X POST -i
-H "Accept: application/json" -H "X-SESSION-ID: $token" -k
"https://192.168.0.1/ws/v2/service_cfg/decode/audio?device=all&langmenu=PMT%20Order"
If successful, the return body will be:
"response": {
"code": "10",
"result": "success",
"message": ""
}
Example 4: Set Audio decoder langmenu option to Language List when previously set to PMT Order
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.
This example is intended to be run only after Example 3 and sets the langmenu option to Language%20List.
Cisco D9800 Network Transport Receiver Version 2.75 RESTful Web Services API Reference Guide
215
API Definitions
Decode Configuration Commands