show dot1x
show dot1x
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 dot1x",
"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 dot1x",
"msg": "Success",
"code": "200",
"body": {
"sys_auth_ctrl": "enable",
"proto_ver": "2"
}
}
}
}
}
The CLI output example below corresponds to the payload example in the code pane on the right. For more information about the show dot1x command, see the CLI command reference:
Note: This example was added in Cisco NX-OS Release 9.2(1).
CLI Output |
---|
|
show dot1x all
show dot1x all
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 dot1x all",
"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 dot1x all",
"msg": "Success",
"code": "200",
"body": {
"sys_auth_ctrl": "enable",
"proto_ver": "2",
"TABLE_all": {
"ROW_all": [
{
"if_index": "Ethernet1/41",
"TABLE_allpae": {
"ROW_allpae": {
"pae_type": "authenticator",
"port_control": "auto",
"host_mode": "multi-host",
"quiet_period": "60",
"inactivity_period": "0",
"tx_period": "1",
"max_req": "1",
"reauth": "disable",
"rate_limit_period": "0",
"supp_timeout": "30",
"server_timeout": "30",
"reauth_server": "disable",
"reauth_period": "3600",
"reauth_max": "1",
"mac_auth_bypass": "enable"
}
}
},
{
"if_index": "Ethernet1/42",
"TABLE_allpae": {
"ROW_allpae": {
"pae_type": "authenticator",
"port_control": "auto",
"host_mode": "multi-host",
"quiet_period": "60",
"inactivity_period": "0",
"tx_period": "1",
"max_req": "1",
"reauth": "disable",
"rate_limit_period": "0",
"supp_timeout": "30",
"server_timeout": "30",
"reauth_server": "disable",
"reauth_period": "3600",
"reauth_max": "1",
"mac_auth_bypass": "enable"
}
}
},
{
"if_index": "Ethernet1/43",
"TABLE_allpae": {
"ROW_allpae": {
"pae_type": "authenticator",
"port_control": "auto",
"host_mode": "multi-host",
"quiet_period": "60",
"inactivity_period": "0",
"tx_period": "1",
"max_req": "1",
"reauth": "disable",
"rate_limit_period": "0",
"supp_timeout": "30",
"server_timeout": "30",
"reauth_server": "disable",
"reauth_period": "3600",
"reauth_max": "1",
"mac_auth_bypass": "enable"
}
}
}
]
}
}
}
}
}
}
The CLI output example below corresponds to the payload example in the code pane on the right. For more information about the show dot1x all command, see the CLI command reference:
Note: This example was added in Cisco NX-OS Release 9.2(1).
CLI Output |
---|
|
show dot1x all details
show dot1x all details
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 dot1x all details",
"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 dot1x all details",
"msg": "Success",
"code": "200",
"body": {
"sys_auth_ctrl": "enable",
"proto_ver": "2",
"TABLE_alldetail": {
"ROW_alldetail": [
{
"if_index": "Ethernet1/41",
"TABLE_allpaedetail": {
"ROW_allpaedetail": {
"pae_type": "authenticator",
"port_control": "auto",
"host_mode": "multi-host",
"quiet_period": "60",
"inactivity_period": "0",
"tx_period": "1",
"max_req": "1",
"reauth": "disable",
"rate_limit_period": "0",
"supp_timeout": "30",
"server_timeout": "30",
"reauth_server": "disable",
"reauth_period": "3600",
"reauth_max": "1",
"mac_auth_bypass": "enable",
"no_of_clients": "1",
"TABLE_if_auth_clients": {
"ROW_if_auth_clients": {
"supp_mac_addr": "0015.5a4c.0003",
"auth_domain": "data",
"auth_sm_state": "authenticated",
"auth_bend_sm_state": "success",
"port_status": "authorized",
"authentication_method": "mab",
"authenticated_by": "server",
"auth_vlan": "20"
}
}
}
}
},
{
"if_index": "Ethernet1/42",
"TABLE_allpaedetail": {
"ROW_allpaedetail": {
"pae_type": "authenticator",
"port_control": "auto",
"host_mode": "multi-host",
"quiet_period": "60",
"inactivity_period": "0",
"tx_period": "1",
"max_req": "1",
"reauth": "disable",
"rate_limit_period": "0",
"supp_timeout": "30",
"server_timeout": "30",
"reauth_server": "disable",
"reauth_period": "3600",
"reauth_max": "1",
"mac_auth_bypass": "enable",
"no_of_clients": "1",
"TABLE_if_auth_clients": {
"ROW_if_auth_clients": {
"supp_mac_addr": "3611.5141.2123",
"auth_domain": "data",
"auth_sm_state": "authenticated",
"auth_bend_sm_state": "success",
"port_status": "authorized",
"authentication_method": "mab",
"authenticated_by": "server",
"auth_vlan": "20"
}
}
}
}
},
{
"if_index": "Ethernet1/43",
"TABLE_allpaedetail": {
"ROW_allpaedetail": {
"pae_type": "authenticator",
"port_control": "auto",
"host_mode": "multi-host",
"quiet_period": "60",
"inactivity_period": "0",
"tx_period": "1",
"max_req": "1",
"reauth": "disable",
"rate_limit_period": "0",
"supp_timeout": "30",
"server_timeout": "30",
"reauth_server": "disable",
"reauth_period": "3600",
"reauth_max": "1",
"mac_auth_bypass": "enable",
"no_of_clients": "1",
"TABLE_if_auth_clients": {
"ROW_if_auth_clients": {
"supp_mac_addr": "0015.5a4c.0004",
"auth_domain": "data",
"auth_sm_state": "authenticated",
"auth_bend_sm_state": "success",
"port_status": "authorized",
"authentication_method": "mab",
"authenticated_by": "server",
"auth_vlan": "20"
}
}
}
}
}
]
}
}
}
}
}
}
The CLI output example below corresponds to the payload example in the code pane on the right. For more information about the show dot1x all details command, see the CLI command reference:
Note: This example was added in Cisco NX-OS Release 9.2(1).
CLI Output |
---|
|
show dot1x all statistics
show dot1x all statistics
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 dot1x all statistics",
"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 dot1x all statistics",
"msg": "Success",
"code": "200",
"body": {
"TABLE_allstat": {
"ROW_allstat": [
{
"if_index": "Ethernet1/41",
"TABLE_allpaestat": {
"ROW_allpaestat": {
"pae_type": "authenticator",
"rxstart": "0",
"rxlogoff": "0",
"rxresp": "0",
"rxrespid": "0",
"rxinvalid": "0",
"rxlenerr": "0",
"rxtotal": "0",
"txreq": "0",
"txreqid": "4",
"txtotal": "4",
"rxversion": "0",
"lastrxsourcemac": "0000.0000.0000"
}
}
},
{
"if_index": "Ethernet1/42",
"TABLE_allpaestat": {
"ROW_allpaestat": {
"pae_type": "authenticator",
"rxstart": "0",
"rxlogoff": "0",
"rxresp": "0",
"rxrespid": "0",
"rxinvalid": "0",
"rxlenerr": "0",
"rxtotal": "5",
"txreq": "0",
"txreqid": "4",
"txtotal": "4",
"rxversion": "2",
"lastrxsourcemac": "0000.0000.0000"
}
}
},
{
"if_index": "Ethernet1/43",
"TABLE_allpaestat": {
"ROW_allpaestat": {
"pae_type": "authenticator",
"rxstart": "0",
"rxlogoff": "0",
"rxresp": "0",
"rxrespid": "0",
"rxinvalid": "0",
"rxlenerr": "0",
"rxtotal": "0",
"txreq": "0",
"txreqid": "5",
"txtotal": "5",
"rxversion": "0",
"lastrxsourcemac": "0000.0000.0000"
}
}
}
]
}
}
}
}
}
}
The CLI output example below corresponds to the payload example in the code pane on the right. For more information about the show dot1x all statistics command, see the CLI command reference:
Note: This example was added in Cisco NX-OS Release 9.2(1).
CLI Output |
---|
|
show dot1x all summary
show dot1x all summary
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 dot1x all summary",
"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 dot1x all summary",
"msg": "Success",
"code": "200",
"body": {
"TABLE_allsummary": {
"ROW_allsummary": [
{
"if_index": "Ethernet1/41",
"pae_type": "authenticator",
"TABLE_if_auth_clients": {
"ROW_if_auth_clients": {
"auth_mac_addr": "0015.5a4c.0003",
"port_status": "authorized"
}
}
},
{
"if_index": "Ethernet1/42",
"pae_type": "authenticator",
"TABLE_if_auth_clients": {
"ROW_if_auth_clients": {
"auth_mac_addr": "3611.5141.2123",
"port_status": "authorized"
}
}
},
{
"if_index": "Ethernet1/43",
"pae_type": "authenticator",
"TABLE_if_auth_clients": {
"ROW_if_auth_clients": {
"auth_mac_addr": "0015.5a4c.0004",
"port_status": "authorized"
}
}
}
]
}
}
}
}
}
}
The CLI output example below corresponds to the payload example in the code pane on the right. For more information about the show dot1x all summary command, see the CLI command reference:
Note: This example was added in Cisco NX-OS Release 9.2(1).
CLI Output |
---|
|
show dot1x interface ethernet 1/41
show dot1x interface ethernet 1/41
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 dot1x interface ethernet 1/41",
"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 dot1x interface ethernet 1/41",
"msg": "Success",
"code": "200",
"body": {
"if_index": "Ethernet1/41",
"pae_type": "authenticator",
"port_control": "auto",
"host_mode": "multi-host",
"quiet_period": "60",
"inactivity_period": "0",
"tx_period": "1",
"max_req": "1",
"reauth": "disable",
"rate_limit_period": "0",
"supp_timeout": "30",
"server_timeout": "30",
"reauth_server": "disable",
"reauth_period": "3600",
"reauth_max": "1",
"mac_auth_bypass": "enable"
}
}
}
}
}
The CLI output example below corresponds to the payload example in the code pane on the right. For more information about the show dot1x interface ethernet 1/41 command, see the CLI command reference:
Note: This example was added in Cisco NX-OS Release 9.2(1).
CLI Output |
---|
|