show terminal
show terminal
import json
"""
Modify these please
"""
url='http://<IP_Address>/ins'
switchuser='<User_ID>'
switchpassword='<Password>'
myheaders={'content-type':'application/json'}
payload={
"ins_api":{
"version": "1.0",
"type": "cli_show",
"chunk": "0",
"sid": "1",
"input": "show terminal",
"output_format": "json"
}
response = requests.post(url,data=json.dumps(payload), headers=myheaders,auth=(switchuser,switchpassword)).json()
output = json.dumps(response, indent=4, sort_keys=True)
{
"ins_api": {
"type": "cli_show",
"version": "1.0",
"sid": "eoc",
"outputs": {
"output": {
"input": "show terminal",
"msg": "Success",
"code": "200",
"body": {
"terminal_tty": "/dev/pts/3",
"terminal_type": "xterm",
"terminal_length": "24 lines, ",
"terminal_width": "80 columns",
"session_timeout": "30 minutes",
"evnt_mgr_cli_evnt_bypass": "no",
"redirection_mode": "ascii",
"acc_log_all_commands": "no",
"vlan_mutex_value": 1,
"vlan_batch_mode": "yes"
}
}
}
}
}
The CLI output example below corresponds to the payload example in the code pane on the right. For more information about the show terminal command, see the CLI command reference:
Note: This example was added in Cisco NX-OS Release 9.2(1).
CLI Output |
---|
|