show ip arp

show ip arp

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 ip arp ",
  "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": {
        "outputs": {
            "output": {
                "body": {
                    "TABLE_vrf": {
                        "ROW_vrf": {
                            "TABLE_adj": {
                                "ROW_adj": [
                                    {
                                        "flags": "", 
                                        "intf-out": "Vlan253", 
                                        "ip-addr-out": "7.57.253.1", 
                                        "mac": "f44e.0584.7ffc", 
                                        "time-stamp": "PT18M21S"
                                    }, 
                                    {
                                        "flags": "", 
                                        "intf-out": "Vlan50", 
                                        "ip-addr-out": "10.57.50.3", 
                                        "mac": "f44e.0584.7ffc", 
                                        "time-stamp": "PT4M31S"
                                    }, 
                                    {
                                        "flags": "", 
                                        "intf-out": "Ethernet1/2", 
                                        "ip-addr-out": "10.100.157.1", 
                                        "mac": "f44e.0584.7ffc", 
                                        "time-stamp": "PT18M34S"
                                    }, 
                                    {
                                        "flags": "", 
                                        "intf-out": "Ethernet1/4", 
                                        "ip-addr-out": "10.100.157.9", 
                                        "mac": "f44e.0584.7ffc", 
                                        "time-stamp": "PT18M35S"
                                    }, 
                                    {
                                        "flags": "", 
                                        "intf-out": "Ethernet1/7", 
                                        "ip-addr-out": "192.168.161.1", 
                                        "mac": "f44e.0584.7ffc", 
                                        "time-stamp": "PT17M56S"
                                    }, 
                                    {
                                        "flags": "", 
                                        "incomplete": "true", 
                                        "intf-out": "Ethernet1/1.50", 
                                        "ip-addr-out": "89.1.1.10", 
                                        "time-stamp": "PT28S"
                                    }, 
                                    {
                                        "flags": "", 
                                        "incomplete": "true", 
                                        "intf-out": "Ethernet1/1.52", 
                                        "ip-addr-out": "89.1.3.10", 
                                        "time-stamp": "PT4S"
                                    }
                                ]
                            }, 
                            "cnt-total": 7, 
                            "vrf-name-out": "default"
                        }
                    }
                }, 
                "code": "200", 
                "input": "show ip arp ", 
                "msg": "Success"
            }
        }, 
        "sid": "eoc", 
        "type": "cli_show", 
        "version": "1.0"
    }
}

The CLI output example below corresponds to the payload example in the code pane on the right. For more information about the show ip arp command, see the CLI command reference:

http//www.cisco.com/c/en/us/support/switches/nexus-3000-series-switches/products-command-reference-list.html

CLI Output
Switch# show ip arp 

Flags: * - Adjacencies learnt on non-active FHRP router
       + - Adjacencies synced via CFSoE
       # - Adjacencies Throttled for Glean
       CP - Added via L2RIB, Control plane Adjacencies
       PS - Added via L2RIB, Peer Sync
       RO - Re-Originated Peer Sync Entry
       D - Static Adjacencies attached to down interface

IP ARP Table for context default
Total number of entries: 7
Address         Age       MAC Address     Interface       Flags
7.57.253.1      00:18:22  f44e.0584.7ffc  Vlan253
10.57.50.3 00:04:32 f44e.0584.7ffc Vlan50
10.100.157.1 00:18:35 f44e.0584.7ffc Ethernet1/2
10.100.157.9 00:18:36 f44e.0584.7ffc Ethernet1/4
192.168.161.1 00:17:57 f44e.0584.7ffc Ethernet1/7
89.1.1.10 00:00:29 INCOMPLETE Ethernet1/1.50
89.1.3.10 00:00:05 INCOMPLETE Ethernet1/1.52

show ip arp detail

show ip arp detail

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 ip arp detail ",
  "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": {
        "outputs": {
            "output": {
                "body": {
                    "TABLE_vrf": {
                        "ROW_vrf": {
                            "TABLE_adj": {
                                "ROW_adj": [
                                    {
                                        "flags": "", 
                                        "intf-out": "Vlan253", 
                                        "ip-addr-out": "7.57.253.1", 
                                        "mac": "f44e.0584.7ffc", 
                                        "phy-intf": "port-channel47", 
                                        "time-stamp": "PT18M22S"
                                    }, 
                                    {
                                        "flags": "", 
                                        "intf-out": "Vlan50", 
                                        "ip-addr-out": "10.57.50.3", 
                                        "mac": "f44e.0584.7ffc", 
                                        "phy-intf": "port-channel47", 
                                        "time-stamp": "PT4M32S"
                                    }, 
                                    {
                                        "flags": "", 
                                        "intf-out": "Ethernet1/2", 
                                        "ip-addr-out": "10.100.157.1", 
                                        "mac": "f44e.0584.7ffc", 
                                        "phy-intf": "Ethernet1/2", 
                                        "time-stamp": "PT18M35S"
                                    }, 
                                    {
                                        "flags": "", 
                                        "intf-out": "Ethernet1/4", 
                                        "ip-addr-out": "10.100.157.9", 
                                        "mac": "f44e.0584.7ffc", 
                                        "phy-intf": "Ethernet1/4", 
                                        "time-stamp": "PT18M37S"
                                    }, 
                                    {
                                        "flags": "", 
                                        "intf-out": "Ethernet1/7", 
                                        "ip-addr-out": "192.168.161.1", 
                                        "mac": "f44e.0584.7ffc", 
                                        "phy-intf": "Ethernet1/7", 
                                        "time-stamp": "PT17M57S"
                                    }, 
                                    {
                                        "flags": "", 
                                        "incomplete": "true", 
                                        "intf-out": "Ethernet1/1.50", 
                                        "ip-addr-out": "89.1.1.10", 
                                        "phy-intf": "Ethernet1/1.50", 
                                        "time-stamp": "PT29S"
                                    }, 
                                    {
                                        "flags": "", 
                                        "incomplete": "true", 
                                        "intf-out": "Ethernet1/1.52", 
                                        "ip-addr-out": "89.1.3.10", 
                                        "phy-intf": "Ethernet1/1.52", 
                                        "time-stamp": "PT6S"
                                    }
                                ]
                            }, 
                            "cnt-total": 7, 
                            "vrf-name-out": "default"
                        }
                    }
                }, 
                "code": "200", 
                "input": "show ip arp detail ", 
                "msg": "Success"
            }
        }, 
        "sid": "eoc", 
        "type": "cli_show", 
        "version": "1.0"
    }
}

The CLI output example below corresponds to the payload example in the code pane on the right. For more information about the show ip arp detail command, see the CLI command reference:

http//www.cisco.com/c/en/us/support/switches/nexus-3000-series-switches/products-command-reference-list.html

CLI Output
Switch# show ip arp detail 

Flags: * - Adjacencies learnt on non-active FHRP router
       + - Adjacencies synced via CFSoE
       # - Adjacencies Throttled for Glean
       CP - Added via L2RIB, Control plane Adjacencies
       PS - Added via L2RIB, Peer Sync
       RO - Re-Originated Peer Sync Entry

IP ARP Table for context default
Total number of entries: 6
Address         Age       MAC Address     Interface        Physical Interface  Flags
7.57.253.1      00:18:23  f44e.0584.7ffc  Vlan253          port-channel47
10.57.50.3 00:04:33 f44e.0584.7ffc Vlan50 port-channel47
10.100.157.1 00:18:36 f44e.0584.7ffc Ethernet1/2 Ethernet1/2
10.100.157.9 00:18:37 f44e.0584.7ffc Ethernet1/4 Ethernet1/4
192.168.161.1 00:17:58 f44e.0584.7ffc Ethernet1/7 Ethernet1/7
89.1.3.10 00:00:06 INCOMPLETE Ethernet1/1.52 Ethernet1/1.52

show ip arp vrf all

show ip arp vrf 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 ip arp vrf 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": {
        "outputs": {
            "output": {
                "body": {
                    "TABLE_vrf": {
                        "ROW_vrf": {
                            "TABLE_adj": {
                                "ROW_adj": [
                                    {
                                        "flags": "", 
                                        "intf-out": "Vlan253", 
                                        "ip-addr-out": "7.57.253.1", 
                                        "mac": "f44e.0584.7ffc", 
                                        "time-stamp": "PT18M25S"
                                    }, 
                                    {
                                        "flags": "", 
                                        "intf-out": "Vlan50", 
                                        "ip-addr-out": "10.57.50.3", 
                                        "mac": "f44e.0584.7ffc", 
                                        "time-stamp": "PT4M35S"
                                    }, 
                                    {
                                        "flags": "", 
                                        "intf-out": "mgmt0", 
                                        "ip-addr-out": "10.197.122.1", 
                                        "mac": "3c08.f621.2c80", 
                                        "time-stamp": "PT9M32S"
                                    }, 
                                    {
                                        "flags": "", 
                                        "intf-out": "mgmt0", 
                                        "ip-addr-out": "10.197.122.121", 
                                        "mac": "0050.5699.c1eb", 
                                        "time-stamp": "PT16M40S"
                                    }, 
                                    {
                                        "flags": "", 
                                        "intf-out": "Ethernet1/2", 
                                        "ip-addr-out": "10.100.157.1", 
                                        "mac": "f44e.0584.7ffc", 
                                        "time-stamp": "PT18M38S"
                                    }, 
                                    {
                                        "flags": "", 
                                        "intf-out": "Ethernet1/4", 
                                        "ip-addr-out": "10.100.157.9", 
                                        "mac": "f44e.0584.7ffc", 
                                        "time-stamp": "PT18M39S"
                                    }, 
                                    {
                                        "flags": "", 
                                        "intf-out": "Ethernet1/7", 
                                        "ip-addr-out": "192.168.161.1", 
                                        "mac": "f44e.0584.7ffc", 
                                        "time-stamp": "PT18M"
                                    }, 
                                    {
                                        "flags": "", 
                                        "intf-out": "Ethernet1/45", 
                                        "ip-addr-out": "7.57.253.6", 
                                        "mac": "f44e.0584.7ffc", 
                                        "time-stamp": "PT18M31S"
                                    }, 
                                    {
                                        "flags": "", 
                                        "intf-out": "Ethernet1/46", 
                                        "ip-addr-out": "7.57.253.10", 
                                        "mac": "f44e.0584.7ffc", 
                                        "time-stamp": "PT18M21S"
                                    }, 
                                    {
                                        "flags": "", 
                                        "incomplete": "true", 
                                        "intf-out": "Ethernet1/1.52", 
                                        "ip-addr-out": "89.1.3.10", 
                                        "time-stamp": "PT8S"
                                    }
                                ]
                            }, 
                            "cnt-total": 10, 
                            "vrf-name-out": "all"
                        }
                    }
                }, 
                "code": "200", 
                "input": "show ip arp vrf all ", 
                "msg": "Success"
            }
        }, 
        "sid": "eoc", 
        "type": "cli_show", 
        "version": "1.0"
    }
}

The CLI output example below corresponds to the payload example in the code pane on the right. For more information about the show ip arp vrf all command, see the CLI command reference:

http//www.cisco.com/c/en/us/support/switches/nexus-3000-series-switches/products-command-reference-list.html

CLI Output
Switch# show ip arp vrf all 

Flags: * - Adjacencies learnt on non-active FHRP router
       + - Adjacencies synced via CFSoE
       # - Adjacencies Throttled for Glean
       CP - Added via L2RIB, Control plane Adjacencies
       PS - Added via L2RIB, Peer Sync
       RO - Re-Originated Peer Sync Entry
       D - Static Adjacencies attached to down interface

IP ARP Table for all contexts
Total number of entries: 11
Address         Age       MAC Address     Interface       Flags
7.57.253.1      00:18:26  f44e.0584.7ffc  Vlan253
10.57.50.3 00:04:36 f44e.0584.7ffc Vlan50
10.197.122.1 00:09:33 3c08.f621.2c80 mgmt0
10.197.122.121 00:16:40 0050.5699.c1eb mgmt0
10.100.157.1 00:18:39 f44e.0584.7ffc Ethernet1/2
10.100.157.9 00:18:40 f44e.0584.7ffc Ethernet1/4
192.168.161.1 00:18:01 f44e.0584.7ffc Ethernet1/7
7.57.253.6 00:18:31 f44e.0584.7ffc Ethernet1/45
7.57.253.10 00:18:22 f44e.0584.7ffc Ethernet1/46
89.1.3.10 00:00:09 INCOMPLETE Ethernet1/1.52

show ip arp vrf default

show ip arp vrf default

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 ip arp vrf default ",
  "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": {
        "outputs": {
            "output": {
                "body": {
                    "TABLE_vrf": {
                        "ROW_vrf": {
                            "TABLE_adj": {
                                "ROW_adj": [
                                    {
                                        "flags": "", 
                                        "intf-out": "Vlan253", 
                                        "ip-addr-out": "7.57.253.1", 
                                        "mac": "f44e.0584.7ffc", 
                                        "time-stamp": "PT18M24S"
                                    }, 
                                    {
                                        "flags": "", 
                                        "intf-out": "Vlan50", 
                                        "ip-addr-out": "10.57.50.3", 
                                        "mac": "f44e.0584.7ffc", 
                                        "time-stamp": "PT4M34S"
                                    }, 
                                    {
                                        "flags": "", 
                                        "intf-out": "Ethernet1/2", 
                                        "ip-addr-out": "10.100.157.1", 
                                        "mac": "f44e.0584.7ffc", 
                                        "time-stamp": "PT18M37S"
                                    }, 
                                    {
                                        "flags": "", 
                                        "intf-out": "Ethernet1/4", 
                                        "ip-addr-out": "10.100.157.9", 
                                        "mac": "f44e.0584.7ffc", 
                                        "time-stamp": "PT18M38S"
                                    }, 
                                    {
                                        "flags": "", 
                                        "intf-out": "Ethernet1/7", 
                                        "ip-addr-out": "192.168.161.1", 
                                        "mac": "f44e.0584.7ffc", 
                                        "time-stamp": "PT17M59S"
                                    }, 
                                    {
                                        "flags": "", 
                                        "incomplete": "true", 
                                        "intf-out": "Ethernet1/1.52", 
                                        "ip-addr-out": "89.1.3.10", 
                                        "time-stamp": "PT7S"
                                    }
                                ]
                            }, 
                            "cnt-total": 6, 
                            "vrf-name-out": "default"
                        }
                    }
                }, 
                "code": "200", 
                "input": "show ip arp vrf default ", 
                "msg": "Success"
            }
        }, 
        "sid": "eoc", 
        "type": "cli_show", 
        "version": "1.0"
    }
}

The CLI output example below corresponds to the payload example in the code pane on the right. For more information about the show ip arp vrf default command, see the CLI command reference:

http//www.cisco.com/c/en/us/support/switches/nexus-3000-series-switches/products-command-reference-list.html

CLI Output
Switch# show ip arp vrf default 

Flags: * - Adjacencies learnt on non-active FHRP router
       + - Adjacencies synced via CFSoE
       # - Adjacencies Throttled for Glean
       CP - Added via L2RIB, Control plane Adjacencies
       PS - Added via L2RIB, Peer Sync
       RO - Re-Originated Peer Sync Entry
       D - Static Adjacencies attached to down interface

IP ARP Table for context default
Total number of entries: 6
Address         Age       MAC Address     Interface       Flags
7.57.253.1      00:18:24  f44e.0584.7ffc  Vlan253
10.57.50.3 00:04:35 f44e.0584.7ffc Vlan50
10.100.157.1 00:18:37 f44e.0584.7ffc Ethernet1/2
10.100.157.9 00:18:39 f44e.0584.7ffc Ethernet1/4
192.168.161.1 00:17:59 f44e.0584.7ffc Ethernet1/7
89.1.3.10 00:00:08 INCOMPLETE Ethernet1/1.52

show ip interface 89.1.4.1

show ip interface 89.1.4.1

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 ip interface 89.1.4.1 ",
  "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": {
        "outputs": {
            "output": {
                "body": {
                    "TABLE_intf": {
                        "ROW_intf": {
                            "admin-state": "up", 
                            "bbyte-consumed": 0, 
                            "bbyte-fwd": 0, 
                            "bbyte-orig": 0, 
                            "bbyte-recv": 0, 
                            "bbyte-sent": 0, 
                            "bcast-addr": "255.255.255.255", 
                            "bpkt-consumed": 0, 
                            "bpkt-fwd": 0, 
                            "bpkt-orig": 0, 
                            "bpkt-recv": 0, 
                            "bpkt-sent": 0, 
                            "dir-bcast": "disabled", 
                            "icmp-redirect": "enabled", 
                            "intf-name": "Ethernet1/1.53", 
                            "iod": 560, 
                            "ip-disabled": "FALSE", 
                            "ip-forwarding": "disabled", 
                            "ip-ls-type": "none", 
                            "ip-unreach": 0, 
                            "lbyte-consumed": 0, 
                            "lbyte-fwd": 0, 
                            "lbyte-orig": 0, 
                            "lbyte-recv": 0, 
                            "lbyte-sent": 0, 
                            "lcl-proxy-arp": "disabled", 
                            "link-state": "up", 
                            "lpkt-consumed": 0, 
                            "lpkt-fwd": 0, 
                            "lpkt-orig": 0, 
                            "lpkt-recv": 0, 
                            "lpkt-sent": 0, 
                            "masklen": 24, 
                            "mbyte-consumed": 0, 
                            "mbyte-fwd": 0, 
                            "mbyte-orig": 0, 
                            "mbyte-recv": 0, 
                            "mbyte-sent": 0, 
                            "mpkt-consumed": 0, 
                            "mpkt-fwd": 0, 
                            "mpkt-orig": 0, 
                            "mpkt-recv": 0, 
                            "mpkt-sent": 0, 
                            "mrouting": "disabled", 
                            "mtu": 1500, 
                            "num-addr": 1, 
                            "num-maddr": 0, 
                            "port-unreach": "enabled", 
                            "pref": 0, 
                            "prefix": "89.1.4.1", 
                            "proto-state": "up", 
                            "proxy-arp": "disabled", 
                            "stats-last-reset": "never", 
                            "subnet": "89.1.4.0", 
                            "tag": 0, 
                            "ubyte-consumed": 0, 
                            "ubyte-fwd": 0, 
                            "ubyte-orig": 0, 
                            "ubyte-recv": 0, 
                            "ubyte-sent": 0, 
                            "upkt-consumed": 0, 
                            "upkt-fwd": 0, 
                            "upkt-orig": 0, 
                            "upkt-recv": 0, 
                            "upkt-sent": 0, 
                            "urpf-mode": "none", 
                            "vrf-name-out": "default", 
                            "wccp-exclude": "disabled", 
                            "wccp-inbound": "disabled", 
                            "wccp-outbound": "disabled"
                        }
                    }
                }, 
                "code": "200", 
                "input": "show ip interface 89.1.4.1 ", 
                "msg": "Success"
            }
        }, 
        "sid": "eoc", 
        "type": "cli_show", 
        "version": "1.0"
    }
}

The CLI output example below corresponds to the payload example in the code pane on the right. For more information about the show ip interface 89.1.4.1 command, see the CLI command reference:

http//www.cisco.com/c/en/us/support/switches/nexus-3000-series-switches/products-command-reference-list.html

CLI Output
Switch# show ip interface 89.1.4.1 

IP Interface Status for VRF "default"
Ethernet1/1.53, Interface status: protocol-up/link-up/admin-up, iod: 560,
  IP address: 89.1.4.1, IP subnet: 89.1.4.0/24 route-preference: 0, tag: 0 
  IP broadcast address: 255.255.255.255
  IP multicast groups locally joined: none
  IP MTU: 1500 bytes (using link MTU)
  IP primary address route-preference: 0, tag: 0
  IP proxy ARP : disabled
  IP Local Proxy ARP : disabled
  IP multicast routing: disabled
  IP icmp redirects: enabled
  IP directed-broadcast: disabled 
  IP Forwarding: disabled 
  IP icmp unreachables (except port): disabled
  IP icmp port-unreachable: enabled
  IP unicast reverse path forwarding: none
  IP load sharing: none 
  IP interface statistics last reset: never
  IP interface software stats: (sent/received/forwarded/originated/consumed)
    Unicast packets    : 0/0/0/0/0
    Unicast bytes      : 0/0/0/0/0
    Multicast packets  : 0/0/0/0/0
    Multicast bytes    : 0/0/0/0/0
    Broadcast packets  : 0/0/0/0/0
    Broadcast bytes    : 0/0/0/0/0
    Labeled packets    : 0/0/0/0/0
    Labeled bytes      : 0/0/0/0/0
  WCCP Redirect outbound: disabled
  WCCP Redirect inbound: disabled
  WCCP Redirect exclude: disabled

show ip interface brief

show ip interface brief

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 ip interface brief ",
  "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": {
        "outputs": {
            "output": {
                "body": {
                    "TABLE_intf": {
                        "ROW_intf": [
                            {
                                "admin-state": "up", 
                                "intf-name": "Vlan1", 
                                "iod": 501, 
                                "ip-disabled": "FALSE", 
                                "link-state": "down", 
                                "prefix": "9.9.9.9", 
                                "proto-state": "down", 
                                "vrf-name-out": "default"
                            }, 
                            {
                                "admin-state": "up", 
                                "intf-name": "Vlan8", 
                                "iod": 494, 
                                "ip-disabled": "FALSE", 
                                "link-state": "up", 
                                "prefix": "10.57.8.3", 
                                "proto-state": "up", 
                                "vrf-name-out": "default"
                            }, 
                            {
                                "admin-state": "up", 
                                "intf-name": "Vlan50", 
                                "iod": 452, 
                                "ip-disabled": "FALSE", 
                                "link-state": "up", 
                                "prefix": "10.57.50.4", 
                                "proto-state": "up", 
                                "vrf-name-out": "default"
                            }, 
                            {
                                "admin-state": "up", 
                                "intf-name": "Vlan253", 
                                "iod": 249, 
                                "ip-disabled": "FALSE", 
                                "link-state": "up", 
                                "prefix": "7.57.253.2", 
                                "proto-state": "up", 
                                "vrf-name-out": "default"
                            }, 
                            {
                                "admin-state": "up", 
                                "intf-name": "Lo0", 
                                "iod": 506, 
                                "ip-disabled": "FALSE", 
                                "link-state": "up", 
                                "prefix": "7.57.255.2", 
                                "proto-state": "up", 
                                "vrf-name-out": "default"
                            }, 
                            {
                                "admin-state": "down", 
                                "intf-name": "Lo100", 
                                "iod": 507, 
                                "ip-disabled": "FALSE", 
                                "link-state": "down", 
                                "prefix": "9.9.9.9", 
                                "proto-state": "down", 
                                "vrf-name-out": "default"
                            }, 
                            {
                                "admin-state": "up", 
                                "intf-name": "Eth1/1", 
                                "iod": 508, 
                                "ip-disabled": "FALSE", 
                                "link-state": "up", 
                                "prefix": "10.100.90.129", 
                                "proto-state": "up", 
                                "vrf-name-out": "default"
                            }, 
                            {
                                "admin-state": "up", 
                                "intf-name": "Eth1/1.50", 
                                "iod": 557, 
                                "ip-disabled": "FALSE", 
                                "link-state": "up", 
                                "prefix": "89.1.1.1", 
                                "proto-state": "up", 
                                "vrf-name-out": "default"
                            }, 
                            {
                                "admin-state": "up", 
                                "intf-name": "Eth1/1.51", 
                                "iod": 558, 
                                "ip-disabled": "FALSE", 
                                "link-state": "up", 
                                "prefix": "89.1.2.1", 
                                "proto-state": "up", 
                                "vrf-name-out": "default"
                            }, 
                            {
                                "admin-state": "up", 
                                "intf-name": "Eth1/1.52", 
                                "iod": 559, 
                                "ip-disabled": "FALSE", 
                                "link-state": "up", 
                                "prefix": "89.1.3.1", 
                                "proto-state": "up", 
                                "vrf-name-out": "default"
                            }, 
                            {
                                "admin-state": "up", 
                                "intf-name": "Eth1/1.53", 
                                "iod": 560, 
                                "ip-disabled": "FALSE", 
                                "link-state": "up", 
                                "prefix": "89.1.4.1", 
                                "proto-state": "up", 
                                "vrf-name-out": "default"
                            }, 
                            {
                                "admin-state": "up", 
                                "intf-name": "Eth1/2", 
                                "iod": 509, 
                                "ip-disabled": "FALSE", 
                                "link-state": "up", 
                                "prefix": "10.100.157.2", 
                                "proto-state": "up", 
                                "vrf-name-out": "default"
                            }, 
                            {
                                "admin-state": "up", 
                                "intf-name": "Eth1/4", 
                                "iod": 511, 
                                "ip-disabled": "FALSE", 
                                "link-state": "up", 
                                "prefix": "10.100.157.10", 
                                "proto-state": "up", 
                                "vrf-name-out": "default"
                            }, 
                            {
                                "admin-state": "up", 
                                "intf-name": "Eth1/5", 
                                "iod": 512, 
                                "ip-disabled": "FALSE", 
                                "link-state": "up", 
                                "prefix": "94.1.1.96", 
                                "proto-state": "up", 
                                "vrf-name-out": "default"
                            }, 
                            {
                                "admin-state": "up", 
                                "intf-name": "Eth1/7", 
                                "iod": 514, 
                                "ip-disabled": "FALSE", 
                                "link-state": "up", 
                                "prefix": "192.168.161.2", 
                                "proto-state": "up", 
                                "vrf-name-out": "default"
                            }
                        ]
                    }
                }, 
                "code": "200", 
                "input": "show ip interface brief ", 
                "msg": "Success"
            }
        }, 
        "sid": "eoc", 
        "type": "cli_show", 
        "version": "1.0"
    }
}

The CLI output example below corresponds to the payload example in the code pane on the right. For more information about the show ip interface brief command, see the CLI command reference:

http//www.cisco.com/c/en/us/support/switches/nexus-3000-series-switches/products-command-reference-list.html

CLI Output
Switch# show ip interface brief 

IP Interface Status for VRF "default"(1)
Interface            IP Address      Interface Status
Vlan1                9.9.9.9         protocol-down/link-down/admin-up
Vlan8 10.57.8.3 protocol-up/link-up/admin-up
Vlan50 10.57.50.4 protocol-up/link-up/admin-up
Vlan253 7.57.253.2 protocol-up/link-up/admin-up
Lo0 7.57.255.2 protocol-up/link-up/admin-up
Lo100 9.9.9.9 protocol-down/link-down/admin-down Eth1/1 10.100.90.129 protocol-up/link-up/admin-up
Eth1/1.50 89.1.1.1 protocol-up/link-up/admin-up
Eth1/1.51 89.1.2.1 protocol-up/link-up/admin-up
Eth1/1.52 89.1.3.1 protocol-up/link-up/admin-up
Eth1/1.53 89.1.4.1 protocol-up/link-up/admin-up
Eth1/2 10.100.157.2 protocol-up/link-up/admin-up
Eth1/4 10.100.157.10 protocol-up/link-up/admin-up
Eth1/5 94.1.1.96 protocol-up/link-up/admin-up
Eth1/7 192.168.161.2 protocol-up/link-up/admin-up

show ip mroute

show ip mroute

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 ip mroute ",
  "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": {
        "outputs": {
            "output": {
                "body": {
                    "TABLE_vrf": {
                        "ROW_vrf": {
                            "TABLE_one_route": {
                                "ROW_one_route": [
                                    {
                                        "TABLE_mpib": {
                                            "ROW_mpib": [
                                                {
                                                    "mpib-name": "pim", 
                                                    "stale-route": "false"
                                                }, 
                                                {
                                                    "mpib-name": "ip", 
                                                    "stale-route": "false"
                                                }
                                            ]
                                        }, 
                                        "bidir": "false", 
                                        "fabric-loser": "false", 
                                        "fabric-oif": "false", 
                                        "group_addrs": "232.0.0.0/8", 
                                        "internal": "false", 
                                        "mcast-addrs": "(*, 232.0.0.0/8)", 
                                        "mofrr": "false", 
                                        "mofrr-iif": "Null", 
                                        "mofrr-nbr": "0.0.0.0", 
                                        "oif-count": "0", 
                                        "pending": "false", 
                                        "route-iif": "Null", 
                                        "rpf-nbr": "0.0.0.0", 
                                        "source_addrs": "*", 
                                        "uptime": "1w0d"
                                    }, 
                                    {
                                        "TABLE_mpib": {
                                            "ROW_mpib": [
                                                {
                                                    "mpib-name": "pim", 
                                                    "stale-route": "false"
                                                }, 
                                                {
                                                    "mpib-name": "ip", 
                                                    "stale-route": "false"
                                                }
                                            ]
                                        }, 
                                        "bidir": "true", 
                                        "fabric-loser": "false", 
                                        "fabric-oif": "false", 
                                        "group_addrs": "239.100.0.0/16", 
                                        "internal": "false", 
                                        "mcast-addrs": "(*, 239.100.0.0/16)", 
                                        "mofrr": "false", 
                                        "mofrr-iif": "Null", 
                                        "mofrr-nbr": "0.0.0.0", 
                                        "oif-count": "0", 
                                        "pending": "false", 
                                        "route-iif": "Null", 
                                        "rpf-nbr": "0.0.0.0", 
                                        "source_addrs": "*", 
                                        "uptime": "1w0d"
                                    }, 
                                    {
                                        "TABLE_mpib": {
                                            "ROW_mpib": [
                                                {
                                                    "mpib-name": "pim", 
                                                    "stale-route": "false"
                                                }, 
                                                {
                                                    "mpib-name": "ip", 
                                                    "stale-route": "false"
                                                }
                                            ]
                                        }, 
                                        "bidir": "true", 
                                        "fabric-loser": "false", 
                                        "fabric-oif": "false", 
                                        "group_addrs": "239.108.0.0/16", 
                                        "internal": "false", 
                                        "mcast-addrs": "(*, 239.108.0.0/16)", 
                                        "mofrr": "false", 
                                        "mofrr-iif": "Null", 
                                        "mofrr-nbr": "0.0.0.0", 
                                        "oif-count": "0", 
                                        "pending": "false", 
                                        "route-iif": "Null", 
                                        "rpf-nbr": "0.0.0.0", 
                                        "source_addrs": "*", 
                                        "uptime": "1w0d"
                                    }, 
                                    {
                                        "TABLE_mpib": {
                                            "ROW_mpib": [
                                                {
                                                    "mpib-name": "pim", 
                                                    "stale-route": "false"
                                                }, 
                                                {
                                                    "mpib-name": "ip", 
                                                    "stale-route": "false"
                                                }
                                            ]
                                        }, 
                                        "bidir": "true", 
                                        "fabric-loser": "false", 
                                        "fabric-oif": "false", 
                                        "group_addrs": "239.110.0.0/16", 
                                        "internal": "false", 
                                        "mcast-addrs": "(*, 239.110.0.0/16)", 
                                        "mofrr": "false", 
                                        "mofrr-iif": "Null", 
                                        "mofrr-nbr": "0.0.0.0", 
                                        "oif-count": "0", 
                                        "pending": "false", 
                                        "route-iif": "Null", 
                                        "rpf-nbr": "0.0.0.0", 
                                        "source_addrs": "*", 
                                        "uptime": "1w0d"
                                    }, 
                                    {
                                        "TABLE_mpib": {
                                            "ROW_mpib": [
                                                {
                                                    "mpib-name": "pim", 
                                                    "stale-route": "false"
                                                }, 
                                                {
                                                    "mpib-name": "ip", 
                                                    "stale-route": "false"
                                                }
                                            ]
                                        }, 
                                        "bidir": "true", 
                                        "fabric-loser": "false", 
                                        "fabric-oif": "false", 
                                        "group_addrs": "239.111.0.0/16", 
                                        "internal": "false", 
                                        "mcast-addrs": "(*, 239.111.0.0/16)", 
                                        "mofrr": "false", 
                                        "mofrr-iif": "Null", 
                                        "mofrr-nbr": "0.0.0.0", 
                                        "oif-count": "0", 
                                        "pending": "false", 
                                        "route-iif": "Null", 
                                        "rpf-nbr": "0.0.0.0", 
                                        "source_addrs": "*", 
                                        "uptime": "1w0d"
                                    }
                                ]
                            }, 
                            "vrf-name": "default"
                        }
                    }
                }, 
                "code": "200", 
                "input": "show ip mroute ", 
                "msg": "Success"
            }
        }, 
        "sid": "eoc", 
        "type": "cli_show", 
        "version": "1.0"
    }
}

The CLI output example below corresponds to the payload example in the code pane on the right. For more information about the show ip mroute command, see the CLI command reference:

http//www.cisco.com/c/en/us/support/switches/nexus-3000-series-switches/products-command-reference-list.html

CLI Output
Switch# show ip mroute 
IP Multicast Routing Table for VRF "default"

(, 232.0.0.0/8), uptime: 1w0d, pim ip 
  Incoming interface: Null, RPF nbr: 0.0.0.0
  Outgoing interface list: (count: 0)


(, 239.100.0.0/16), bidir, uptime: 1w0d, pim ip 
  Incoming interface: Null, RPF nbr: 0.0.0.0
  Outgoing interface list: (count: 0)


(, 239.108.0.0/16), bidir, uptime: 1w0d, pim ip 
  Incoming interface: Null, RPF nbr: 0.0.0.0
  Outgoing interface list: (count: 0)


(, 239.110.0.0/16), bidir, uptime: 1w0d, pim ip 
  Incoming interface: Null, RPF nbr: 0.0.0.0
  Outgoing interface list: (count: 0)


(*, 239.111.0.0/16), bidir, uptime: 1w0d, pim ip 
  Incoming interface: Null, RPF nbr: 0.0.0.0
  Outgoing interface list: (count: 0)



show ip mroute shared-tree summary

show ip mroute shared-tree 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 ip mroute shared-tree 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": {
        "outputs": {
            "output": {
                "body": {
                    "TABLE_vrf": {
                        "ROW_vrf": {
                            "TABLE_route_summary": {
                                "ROW_route_summary": {
                                    "avg": "0", 
                                    "group-count": "0", 
                                    "rem": "0", 
                                    "sg-route": "0", 
                                    "star-g-prfx": "5", 
                                    "star-g-route": "0", 
                                    "total-num-routes": "5"
                                }
                            }, 
                            "TABLE_summary_source": {
                                "ROW_summary_source": [
                                    {
                                        "TABLE_one_sg": {
                                            "ROW_one_sg": {
                                                "aps": "0", 
                                                "bytes": "0", 
                                                "oifs": "0", 
                                                "packets": "0", 
                                                "pps": "0", 
                                                "rate_buf": "0.000   bps", 
                                                "source_addr": "(*,G)"
                                            }
                                        }, 
                                        "group_addr": "232.0.0.0", 
                                        "group_mask_len": "8", 
                                        "source_count": "0"
                                    }, 
                                    {
                                        "TABLE_one_sg": {
                                            "ROW_one_sg": {
                                                "aps": "0", 
                                                "bytes": "0", 
                                                "oifs": "0", 
                                                "packets": "0", 
                                                "pps": "0", 
                                                "rate_buf": "0.000   bps", 
                                                "source_addr": "(*,G)"
                                            }
                                        }, 
                                        "group_addr": "239.100.0.0", 
                                        "group_mask_len": "16", 
                                        "source_count": "0"
                                    }, 
                                    {
                                        "TABLE_one_sg": {
                                            "ROW_one_sg": {
                                                "aps": "0", 
                                                "bytes": "0", 
                                                "oifs": "0", 
                                                "packets": "0", 
                                                "pps": "0", 
                                                "rate_buf": "0.000   bps", 
                                                "source_addr": "(*,G)"
                                            }
                                        }, 
                                        "group_addr": "239.108.0.0", 
                                        "group_mask_len": "16", 
                                        "source_count": "0"
                                    }, 
                                    {
                                        "TABLE_one_sg": {
                                            "ROW_one_sg": {
                                                "aps": "0", 
                                                "bytes": "0", 
                                                "oifs": "0", 
                                                "packets": "0", 
                                                "pps": "0", 
                                                "rate_buf": "0.000   bps", 
                                                "source_addr": "(*,G)"
                                            }
                                        }, 
                                        "group_addr": "239.110.0.0", 
                                        "group_mask_len": "16", 
                                        "source_count": "0"
                                    }, 
                                    {
                                        "TABLE_one_sg": {
                                            "ROW_one_sg": {
                                                "aps": "0", 
                                                "bytes": "0", 
                                                "oifs": "0", 
                                                "packets": "0", 
                                                "pps": "0", 
                                                "rate_buf": "0.000   bps", 
                                                "source_addr": "(*,G)"
                                            }
                                        }, 
                                        "group_addr": "239.111.0.0", 
                                        "group_mask_len": "16", 
                                        "source_count": "0"
                                    }
                                ]
                            }, 
                            "vrf-name": "default"
                        }
                    }
                }, 
                "code": "200", 
                "input": "show ip mroute shared-tree summary ", 
                "msg": "Success"
            }
        }, 
        "sid": "eoc", 
        "type": "cli_show", 
        "version": "1.0"
    }
}

The CLI output example below corresponds to the payload example in the code pane on the right. For more information about the show ip mroute shared-tree summary command, see the CLI command reference:

http//www.cisco.com/c/en/us/support/switches/nexus-3000-series-switches/products-command-reference-list.html

CLI Output
Switch# show ip mroute shared-tree summary 
IP Multicast Routing Table for VRF "default"
Route Statistics unavailable - only liveness detected

Total number of routes: 5
Total number of (,G) routes: 0
Total number of (S,G) routes: 0
Total number of (,G-prefix) routes: 5
Group count: 0, rough average sources per group: 0.0

Group: 232.0.0.0/8, Source count: 0
Source          packets      bytes           aps   pps       bit-rate     oifs
(,G)           0            0               0     0         0.000   bps  0

Group: 239.100.0.0/16, Source count: 0
Source          packets      bytes           aps   pps       bit-rate     oifs
(,G)           0            0               0     0         0.000   bps  0

Group: 239.108.0.0/16, Source count: 0
Source          packets      bytes           aps   pps       bit-rate     oifs
(,G)           0            0               0     0         0.000   bps  0

Group: 239.110.0.0/16, Source count: 0
Source          packets      bytes           aps   pps       bit-rate     oifs
(,G)           0            0               0     0         0.000   bps  0

Group: 239.111.0.0/16, Source count: 0
Source          packets      bytes           aps   pps       bit-rate     oifs
(*,G)           0            0               0     0         0.000   bps  0

show ip mroute source-tree summary

show ip mroute source-tree 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 ip mroute source-tree 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": {
        "outputs": {
            "output": {
                "body": {
                    "TABLE_vrf": {
                        "ROW_vrf": {
                            "TABLE_route_summary": {
                                "ROW_route_summary": {
                                    "avg": "0", 
                                    "group-count": "0", 
                                    "rem": "0", 
                                    "sg-route": "0", 
                                    "star-g-prfx": "5", 
                                    "star-g-route": "0", 
                                    "total-num-routes": "5"
                                }
                            }, 
                            "TABLE_summary_source": {
                                "ROW_summary_source": [
                                    {
                                        "TABLE_one_sg": {
                                            "ROW_one_sg": {
                                                "aps": "0", 
                                                "bytes": "0", 
                                                "oifs": "0", 
                                                "packets": "0", 
                                                "pps": "0", 
                                                "rate_buf": "0.000   bps", 
                                                "source_addr": "(*,G)"
                                            }
                                        }, 
                                        "group_addr": "232.0.0.0", 
                                        "group_mask_len": "8", 
                                        "source_count": "0"
                                    }, 
                                    {
                                        "TABLE_one_sg": {
                                            "ROW_one_sg": {
                                                "aps": "0", 
                                                "bytes": "0", 
                                                "oifs": "0", 
                                                "packets": "0", 
                                                "pps": "0", 
                                                "rate_buf": "0.000   bps", 
                                                "source_addr": "(*,G)"
                                            }
                                        }, 
                                        "group_addr": "239.100.0.0", 
                                        "group_mask_len": "16", 
                                        "source_count": "0"
                                    }, 
                                    {
                                        "TABLE_one_sg": {
                                            "ROW_one_sg": {
                                                "aps": "0", 
                                                "bytes": "0", 
                                                "oifs": "0", 
                                                "packets": "0", 
                                                "pps": "0", 
                                                "rate_buf": "0.000   bps", 
                                                "source_addr": "(*,G)"
                                            }
                                        }, 
                                        "group_addr": "239.108.0.0", 
                                        "group_mask_len": "16", 
                                        "source_count": "0"
                                    }, 
                                    {
                                        "TABLE_one_sg": {
                                            "ROW_one_sg": {
                                                "aps": "0", 
                                                "bytes": "0", 
                                                "oifs": "0", 
                                                "packets": "0", 
                                                "pps": "0", 
                                                "rate_buf": "0.000   bps", 
                                                "source_addr": "(*,G)"
                                            }
                                        }, 
                                        "group_addr": "239.110.0.0", 
                                        "group_mask_len": "16", 
                                        "source_count": "0"
                                    }, 
                                    {
                                        "TABLE_one_sg": {
                                            "ROW_one_sg": {
                                                "aps": "0", 
                                                "bytes": "0", 
                                                "oifs": "0", 
                                                "packets": "0", 
                                                "pps": "0", 
                                                "rate_buf": "0.000   bps", 
                                                "source_addr": "(*,G)"
                                            }
                                        }, 
                                        "group_addr": "239.111.0.0", 
                                        "group_mask_len": "16", 
                                        "source_count": "0"
                                    }
                                ]
                            }, 
                            "vrf-name": "default"
                        }
                    }
                }, 
                "code": "200", 
                "input": "show ip mroute source-tree summary ", 
                "msg": "Success"
            }
        }, 
        "sid": "eoc", 
        "type": "cli_show", 
        "version": "1.0"
    }
}

The CLI output example below corresponds to the payload example in the code pane on the right. For more information about the show ip mroute source-tree summary command, see the CLI command reference:

http//www.cisco.com/c/en/us/support/switches/nexus-3000-series-switches/products-command-reference-list.html

CLI Output
Switch# show ip mroute source-tree summary 
IP Multicast Routing Table for VRF "default"
Route Statistics unavailable - only liveness detected

Total number of routes: 5
Total number of (,G) routes: 0
Total number of (S,G) routes: 0
Total number of (,G-prefix) routes: 5
Group count: 0, rough average sources per group: 0.0

Group: 232.0.0.0/8, Source count: 0
Source          packets      bytes           aps   pps       bit-rate     oifs
(,G)           0            0               0     0         0.000   bps  0

Group: 239.100.0.0/16, Source count: 0
Source          packets      bytes           aps   pps       bit-rate     oifs
(,G)           0            0               0     0         0.000   bps  0

Group: 239.108.0.0/16, Source count: 0
Source          packets      bytes           aps   pps       bit-rate     oifs
(,G)           0            0               0     0         0.000   bps  0

Group: 239.110.0.0/16, Source count: 0
Source          packets      bytes           aps   pps       bit-rate     oifs
(,G)           0            0               0     0         0.000   bps  0

Group: 239.111.0.0/16, Source count: 0
Source          packets      bytes           aps   pps       bit-rate     oifs
(*,G)           0            0               0     0         0.000   bps  0

show ip mroute sr

show ip mroute sr

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 ip mroute sr ",
  "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": {
        "outputs": {
            "output": {
                "body": {
                    "TABLE_vrf": {
                        "ROW_vrf": {
                            "vrf-name": "default"
                        }
                    }
                }, 
                "code": "200", 
                "input": "show ip mroute sr ", 
                "msg": "Success"
            }
        }, 
        "sid": "eoc", 
        "type": "cli_show", 
        "version": "1.0"
    }
}

The CLI output example below corresponds to the payload example in the code pane on the right. For more information about the show ip mroute sr command, see the CLI command reference:

http//www.cisco.com/c/en/us/support/switches/nexus-3000-series-switches/products-command-reference-list.html

CLI Output
Switch# show ip mroute sr 
IP Multicast Routing Table for VRF "default"


show ip mroute summary

show ip mroute 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 ip mroute 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": {
        "outputs": {
            "output": {
                "body": {
                    "TABLE_vrf": {
                        "ROW_vrf": {
                            "TABLE_route_summary": {
                                "ROW_route_summary": {
                                    "avg": "0", 
                                    "group-count": "0", 
                                    "rem": "0", 
                                    "sg-route": "0", 
                                    "star-g-prfx": "5", 
                                    "star-g-route": "0", 
                                    "total-num-routes": "5"
                                }
                            }, 
                            "TABLE_summary_source": {
                                "ROW_summary_source": [
                                    {
                                        "TABLE_one_sg": {
                                            "ROW_one_sg": {
                                                "aps": "0", 
                                                "bytes": "0", 
                                                "oifs": "0", 
                                                "packets": "0", 
                                                "pps": "0", 
                                                "rate_buf": "0.000   bps", 
                                                "source_addr": "(*,G)"
                                            }
                                        }, 
                                        "group_addr": "232.0.0.0", 
                                        "group_mask_len": "8", 
                                        "source_count": "0"
                                    }, 
                                    {
                                        "TABLE_one_sg": {
                                            "ROW_one_sg": {
                                                "aps": "0", 
                                                "bytes": "0", 
                                                "oifs": "0", 
                                                "packets": "0", 
                                                "pps": "0", 
                                                "rate_buf": "0.000   bps", 
                                                "source_addr": "(*,G)"
                                            }
                                        }, 
                                        "group_addr": "239.100.0.0", 
                                        "group_mask_len": "16", 
                                        "source_count": "0"
                                    }, 
                                    {
                                        "TABLE_one_sg": {
                                            "ROW_one_sg": {
                                                "aps": "0", 
                                                "bytes": "0", 
                                                "oifs": "0", 
                                                "packets": "0", 
                                                "pps": "0", 
                                                "rate_buf": "0.000   bps", 
                                                "source_addr": "(*,G)"
                                            }
                                        }, 
                                        "group_addr": "239.108.0.0", 
                                        "group_mask_len": "16", 
                                        "source_count": "0"
                                    }, 
                                    {
                                        "TABLE_one_sg": {
                                            "ROW_one_sg": {
                                                "aps": "0", 
                                                "bytes": "0", 
                                                "oifs": "0", 
                                                "packets": "0", 
                                                "pps": "0", 
                                                "rate_buf": "0.000   bps", 
                                                "source_addr": "(*,G)"
                                            }
                                        }, 
                                        "group_addr": "239.110.0.0", 
                                        "group_mask_len": "16", 
                                        "source_count": "0"
                                    }, 
                                    {
                                        "TABLE_one_sg": {
                                            "ROW_one_sg": {
                                                "aps": "0", 
                                                "bytes": "0", 
                                                "oifs": "0", 
                                                "packets": "0", 
                                                "pps": "0", 
                                                "rate_buf": "0.000   bps", 
                                                "source_addr": "(*,G)"
                                            }
                                        }, 
                                        "group_addr": "239.111.0.0", 
                                        "group_mask_len": "16", 
                                        "source_count": "0"
                                    }
                                ]
                            }, 
                            "vrf-name": "default"
                        }
                    }
                }, 
                "code": "200", 
                "input": "show ip mroute summary ", 
                "msg": "Success"
            }
        }, 
        "sid": "eoc", 
        "type": "cli_show", 
        "version": "1.0"
    }
}

The CLI output example below corresponds to the payload example in the code pane on the right. For more information about the show ip mroute summary command, see the CLI command reference:

http//www.cisco.com/c/en/us/support/switches/nexus-3000-series-switches/products-command-reference-list.html

CLI Output
Switch# show ip mroute summary 
IP Multicast Routing Table for VRF "default"
Route Statistics unavailable - only liveness detected

Total number of routes: 5
Total number of (,G) routes: 0
Total number of (S,G) routes: 0
Total number of (,G-prefix) routes: 5
Group count: 0, rough average sources per group: 0.0

Group: 232.0.0.0/8, Source count: 0
Source          packets      bytes           aps   pps       bit-rate     oifs
(,G)           0            0               0     0         0.000   bps  0

Group: 239.100.0.0/16, Source count: 0
Source          packets      bytes           aps   pps       bit-rate     oifs
(,G)           0            0               0     0         0.000   bps  0

Group: 239.108.0.0/16, Source count: 0
Source          packets      bytes           aps   pps       bit-rate     oifs
(,G)           0            0               0     0         0.000   bps  0

Group: 239.110.0.0/16, Source count: 0
Source          packets      bytes           aps   pps       bit-rate     oifs
(,G)           0            0               0     0         0.000   bps  0

Group: 239.111.0.0/16, Source count: 0
Source          packets      bytes           aps   pps       bit-rate     oifs
(*,G)           0            0               0     0         0.000   bps  0

show ip mroute vrf all

show ip mroute vrf 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 ip mroute vrf 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": {
        "outputs": {
            "output": {
                "body": {
                    "TABLE_vrf": {
                        "ROW_vrf": [
                            {
                                "TABLE_one_route": {
                                    "ROW_one_route": [
                                        {
                                            "TABLE_mpib": {
                                                "ROW_mpib": [
                                                    {
                                                        "mpib-name": "pim", 
                                                        "stale-route": "false"
                                                    }, 
                                                    {
                                                        "mpib-name": "ip", 
                                                        "stale-route": "false"
                                                    }
                                                ]
                                            }, 
                                            "bidir": "false", 
                                            "fabric-loser": "false", 
                                            "fabric-oif": "false", 
                                            "group_addrs": "232.0.0.0/8", 
                                            "internal": "false", 
                                            "mcast-addrs": "(*, 232.0.0.0/8)", 
                                            "mofrr": "false", 
                                            "mofrr-iif": "Null", 
                                            "mofrr-nbr": "0.0.0.0", 
                                            "oif-count": "0", 
                                            "pending": "false", 
                                            "route-iif": "Null", 
                                            "rpf-nbr": "0.0.0.0", 
                                            "source_addrs": "*", 
                                            "uptime": "1w0d"
                                        }, 
                                        {
                                            "TABLE_mpib": {
                                                "ROW_mpib": [
                                                    {
                                                        "mpib-name": "pim", 
                                                        "stale-route": "false"
                                                    }, 
                                                    {
                                                        "mpib-name": "ip", 
                                                        "stale-route": "false"
                                                    }
                                                ]
                                            }, 
                                            "bidir": "true", 
                                            "fabric-loser": "false", 
                                            "fabric-oif": "false", 
                                            "group_addrs": "239.100.0.0/16", 
                                            "internal": "false", 
                                            "mcast-addrs": "(*, 239.100.0.0/16)", 
                                            "mofrr": "false", 
                                            "mofrr-iif": "Null", 
                                            "mofrr-nbr": "0.0.0.0", 
                                            "oif-count": "0", 
                                            "pending": "false", 
                                            "route-iif": "Null", 
                                            "rpf-nbr": "0.0.0.0", 
                                            "source_addrs": "*", 
                                            "uptime": "1w0d"
                                        }, 
                                        {
                                            "TABLE_mpib": {
                                                "ROW_mpib": [
                                                    {
                                                        "mpib-name": "pim", 
                                                        "stale-route": "false"
                                                    }, 
                                                    {
                                                        "mpib-name": "ip", 
                                                        "stale-route": "false"
                                                    }
                                                ]
                                            }, 
                                            "bidir": "true", 
                                            "fabric-loser": "false", 
                                            "fabric-oif": "false", 
                                            "group_addrs": "239.108.0.0/16", 
                                            "internal": "false", 
                                            "mcast-addrs": "(*, 239.108.0.0/16)", 
                                            "mofrr": "false", 
                                            "mofrr-iif": "Null", 
                                            "mofrr-nbr": "0.0.0.0", 
                                            "oif-count": "0", 
                                            "pending": "false", 
                                            "route-iif": "Null", 
                                            "rpf-nbr": "0.0.0.0", 
                                            "source_addrs": "*", 
                                            "uptime": "1w0d"
                                        }, 
                                        {
                                            "TABLE_mpib": {
                                                "ROW_mpib": [
                                                    {
                                                        "mpib-name": "pim", 
                                                        "stale-route": "false"
                                                    }, 
                                                    {
                                                        "mpib-name": "ip", 
                                                        "stale-route": "false"
                                                    }
                                                ]
                                            }, 
                                            "bidir": "true", 
                                            "fabric-loser": "false", 
                                            "fabric-oif": "false", 
                                            "group_addrs": "239.110.0.0/16", 
                                            "internal": "false", 
                                            "mcast-addrs": "(*, 239.110.0.0/16)", 
                                            "mofrr": "false", 
                                            "mofrr-iif": "Null", 
                                            "mofrr-nbr": "0.0.0.0", 
                                            "oif-count": "0", 
                                            "pending": "false", 
                                            "route-iif": "Null", 
                                            "rpf-nbr": "0.0.0.0", 
                                            "source_addrs": "*", 
                                            "uptime": "1w0d"
                                        }, 
                                        {
                                            "TABLE_mpib": {
                                                "ROW_mpib": [
                                                    {
                                                        "mpib-name": "pim", 
                                                        "stale-route": "false"
                                                    }, 
                                                    {
                                                        "mpib-name": "ip", 
                                                        "stale-route": "false"
                                                    }
                                                ]
                                            }, 
                                            "bidir": "true", 
                                            "fabric-loser": "false", 
                                            "fabric-oif": "false", 
                                            "group_addrs": "239.111.0.0/16", 
                                            "internal": "false", 
                                            "mcast-addrs": "(*, 239.111.0.0/16)", 
                                            "mofrr": "false", 
                                            "mofrr-iif": "Null", 
                                            "mofrr-nbr": "0.0.0.0", 
                                            "oif-count": "0", 
                                            "pending": "false", 
                                            "route-iif": "Null", 
                                            "rpf-nbr": "0.0.0.0", 
                                            "source_addrs": "*", 
                                            "uptime": "1w0d"
                                        }
                                    ]
                                }, 
                                "vrf-name": "default"
                            }, 
                            {
                                "TABLE_one_route": {
                                    "ROW_one_route": {
                                        "TABLE_mpib": {
                                            "ROW_mpib": [
                                                {
                                                    "mpib-name": "pim", 
                                                    "stale-route": "false"
                                                }, 
                                                {
                                                    "mpib-name": "ip", 
                                                    "stale-route": "false"
                                                }
                                            ]
                                        }, 
                                        "bidir": "false", 
                                        "fabric-loser": "false", 
                                        "fabric-oif": "false", 
                                        "group_addrs": "232.0.0.0/8", 
                                        "internal": "false", 
                                        "mcast-addrs": "(*, 232.0.0.0/8)", 
                                        "mofrr": "false", 
                                        "mofrr-iif": "Null", 
                                        "mofrr-nbr": "0.0.0.0", 
                                        "oif-count": "0", 
                                        "pending": "false", 
                                        "route-iif": "Null", 
                                        "rpf-nbr": "0.0.0.0", 
                                        "source_addrs": "*", 
                                        "uptime": "1w0d"
                                    }
                                }, 
                                "vrf-name": "test"
                            }
                        ]
                    }
                }, 
                "code": "200", 
                "input": "show ip mroute vrf all ", 
                "msg": "Success"
            }
        }, 
        "sid": "eoc", 
        "type": "cli_show", 
        "version": "1.0"
    }
}

The CLI output example below corresponds to the payload example in the code pane on the right. For more information about the show ip mroute vrf all command, see the CLI command reference:

http//www.cisco.com/c/en/us/support/switches/nexus-3000-series-switches/products-command-reference-list.html

CLI Output
Switch# show ip mroute vrf all 
IP Multicast Routing Table for VRF "default"

(, 232.0.0.0/8), uptime: 1w0d, pim ip 
  Incoming interface: Null, RPF nbr: 0.0.0.0
  Outgoing interface list: (count: 0)


(, 239.100.0.0/16), bidir, uptime: 1w0d, pim ip 
  Incoming interface: Null, RPF nbr: 0.0.0.0
  Outgoing interface list: (count: 0)


(, 239.108.0.0/16), bidir, uptime: 1w0d, pim ip 
  Incoming interface: Null, RPF nbr: 0.0.0.0
  Outgoing interface list: (count: 0)


(, 239.110.0.0/16), bidir, uptime: 1w0d, pim ip 
  Incoming interface: Null, RPF nbr: 0.0.0.0
  Outgoing interface list: (count: 0)


(, 239.111.0.0/16), bidir, uptime: 1w0d, pim ip 
  Incoming interface: Null, RPF nbr: 0.0.0.0
  Outgoing interface list: (count: 0)



IP Multicast Routing Table for VRF "test"

(, 232.0.0.0/8), uptime: 1w0d, pim ip 
  Incoming interface: Null, RPF nbr: 0.0.0.0
  Outgoing interface list: (count: 0)




show ip mroute vrf test

show ip mroute vrf test

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 ip mroute vrf test ",
  "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": {
        "outputs": {
            "output": {
                "body": {
                    "TABLE_vrf": {
                        "ROW_vrf": {
                            "TABLE_one_route": {
                                "ROW_one_route": {
                                    "TABLE_mpib": {
                                        "ROW_mpib": [
                                            {
                                                "mpib-name": "pim", 
                                                "stale-route": "false"
                                            }, 
                                            {
                                                "mpib-name": "ip", 
                                                "stale-route": "false"
                                            }
                                        ]
                                    }, 
                                    "bidir": "false", 
                                    "fabric-loser": "false", 
                                    "fabric-oif": "false", 
                                    "group_addrs": "232.0.0.0/8", 
                                    "internal": "false", 
                                    "mcast-addrs": "(*, 232.0.0.0/8)", 
                                    "mofrr": "false", 
                                    "mofrr-iif": "Null", 
                                    "mofrr-nbr": "0.0.0.0", 
                                    "oif-count": "0", 
                                    "pending": "false", 
                                    "route-iif": "Null", 
                                    "rpf-nbr": "0.0.0.0", 
                                    "source_addrs": "*", 
                                    "uptime": "1w0d"
                                }
                            }, 
                            "vrf-name": "test"
                        }
                    }
                }, 
                "code": "200", 
                "input": "show ip mroute vrf test ", 
                "msg": "Success"
            }
        }, 
        "sid": "eoc", 
        "type": "cli_show", 
        "version": "1.0"
    }
}

The CLI output example below corresponds to the payload example in the code pane on the right. For more information about the show ip mroute vrf test command, see the CLI command reference:

http//www.cisco.com/c/en/us/support/switches/nexus-3000-series-switches/products-command-reference-list.html

CLI Output
Switch# show ip mroute vrf test 
IP Multicast Routing Table for VRF "test"

(*, 232.0.0.0/8), uptime: 1w0d, pim ip 
  Incoming interface: Null, RPF nbr: 0.0.0.0
  Outgoing interface list: (count: 0)



show ip pim df

show ip pim df

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 ip pim df ",
  "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": {
        "outputs": {
            "output": {
                "body": {
                    "TABLE_ctx": {
                        "ROW_ctx": {
                            "TABLE_rp": {
                                "ROW_rp": [
                                    {
                                        "TABLE_grange": {
                                            "ROW_grange": {
                                                "grange-grp": "239.110.0.0", 
                                                "grange-masklen": "16"
                                            }
                                        }, 
                                        "TABLE_iod": {
                                            "ROW_iod": [
                                                {
                                                    "df-state": "Loser", 
                                                    "df-winner": "0.0.0.0", 
                                                    "if-name": "Vlan253", 
                                                    "is-rpf": "false", 
                                                    "uptime": "1w0d", 
                                                    "winner-metric": "-1", 
                                                    "winner-metric-pref": "-1"
                                                }, 
                                                {
                                                    "df-state": "Loser", 
                                                    "df-winner": "0.0.0.0", 
                                                    "if-name": "Vlan50", 
                                                    "is-rpf": "false", 
                                                    "uptime": "1w0d", 
                                                    "winner-metric": "-1", 
                                                    "winner-metric-pref": "-1"
                                                }, 
                                                {
                                                    "df-state": "Loser", 
                                                    "df-winner": "0.0.0.0", 
                                                    "if-name": "Vlan8", 
                                                    "is-rpf": "false", 
                                                    "uptime": "1w0d", 
                                                    "winner-metric": "-1", 
                                                    "winner-metric-pref": "-1"
                                                }, 
                                                {
                                                    "df-state": "Loser", 
                                                    "df-winner": "0.0.0.0", 
                                                    "if-name": "Lo0", 
                                                    "is-rpf": "false", 
                                                    "uptime": "1w0d", 
                                                    "winner-metric": "-1", 
                                                    "winner-metric-pref": "-1"
                                                }, 
                                                {
                                                    "df-state": "Loser", 
                                                    "df-winner": "0.0.0.0", 
                                                    "if-name": "Eth1/1", 
                                                    "is-rpf": "false", 
                                                    "uptime": "6d12h", 
                                                    "winner-metric": "-1", 
                                                    "winner-metric-pref": "-1"
                                                }, 
                                                {
                                                    "df-state": "Loser", 
                                                    "df-winner": "0.0.0.0", 
                                                    "if-name": "Eth1/2", 
                                                    "is-rpf": "false", 
                                                    "uptime": "1w0d", 
                                                    "winner-metric": "-1", 
                                                    "winner-metric-pref": "-1"
                                                }, 
                                                {
                                                    "df-state": "Loser", 
                                                    "df-winner": "0.0.0.0", 
                                                    "if-name": "Eth1/4", 
                                                    "is-rpf": "false", 
                                                    "uptime": "1w0d", 
                                                    "winner-metric": "-1", 
                                                    "winner-metric-pref": "-1"
                                                }
                                            ]
                                        }, 
                                        "df-ordinal": "2", 
                                        "metric": "-1", 
                                        "metric-pref": "-1", 
                                        "rp-addr": "10.8.255.89"
                                    }, 
                                    {
                                        "TABLE_grange": {
                                            "ROW_grange": [
                                                {
                                                    "grange-grp": "239.100.0.0", 
                                                    "grange-masklen": "16"
                                                }, 
                                                {
                                                    "grange-grp": "239.111.0.0", 
                                                    "grange-masklen": "16"
                                                }, 
                                                {
                                                    "grange-grp": "239.108.0.0", 
                                                    "grange-masklen": "16"
                                                }
                                            ]
                                        }, 
                                        "TABLE_iod": {
                                            "ROW_iod": [
                                                {
                                                    "df-state": "Loser", 
                                                    "df-winner": "0.0.0.0", 
                                                    "if-name": "Vlan253", 
                                                    "is-rpf": "false", 
                                                    "uptime": "1w0d", 
                                                    "winner-metric": "-1", 
                                                    "winner-metric-pref": "-1"
                                                }, 
                                                {
                                                    "df-state": "Loser", 
                                                    "df-winner": "0.0.0.0", 
                                                    "if-name": "Vlan50", 
                                                    "is-rpf": "false", 
                                                    "uptime": "1w0d", 
                                                    "winner-metric": "-1", 
                                                    "winner-metric-pref": "-1"
                                                }, 
                                                {
                                                    "df-state": "Loser", 
                                                    "df-winner": "0.0.0.0", 
                                                    "if-name": "Vlan8", 
                                                    "is-rpf": "false", 
                                                    "uptime": "1w0d", 
                                                    "winner-metric": "-1", 
                                                    "winner-metric-pref": "-1"
                                                }, 
                                                {
                                                    "df-state": "Loser", 
                                                    "df-winner": "0.0.0.0", 
                                                    "if-name": "Lo0", 
                                                    "is-rpf": "false", 
                                                    "uptime": "1w0d", 
                                                    "winner-metric": "-1", 
                                                    "winner-metric-pref": "-1"
                                                }, 
                                                {
                                                    "df-state": "Loser", 
                                                    "df-winner": "0.0.0.0", 
                                                    "if-name": "Eth1/1", 
                                                    "is-rpf": "false", 
                                                    "uptime": "6d12h", 
                                                    "winner-metric": "-1", 
                                                    "winner-metric-pref": "-1"
                                                }, 
                                                {
                                                    "df-state": "Loser", 
                                                    "df-winner": "0.0.0.0", 
                                                    "if-name": "Eth1/2", 
                                                    "is-rpf": "false", 
                                                    "uptime": "1w0d", 
                                                    "winner-metric": "-1", 
                                                    "winner-metric-pref": "-1"
                                                }, 
                                                {
                                                    "df-state": "Loser", 
                                                    "df-winner": "0.0.0.0", 
                                                    "if-name": "Eth1/4", 
                                                    "is-rpf": "false", 
                                                    "uptime": "1w0d", 
                                                    "winner-metric": "-1", 
                                                    "winner-metric-pref": "-1"
                                                }
                                            ]
                                        }, 
                                        "df-ordinal": "1", 
                                        "metric": "-1", 
                                        "metric-pref": "-1", 
                                        "rp-addr": "10.28.255.4"
                                    }
                                ]
                            }, 
                            "out-context": "default"
                        }
                    }
                }, 
                "code": "200", 
                "input": "show ip pim df ", 
                "msg": "Success"
            }
        }, 
        "sid": "eoc", 
        "type": "cli_show", 
        "version": "1.0"
    }
}

The CLI output example below corresponds to the payload example in the code pane on the right. For more information about the show ip pim df command, see the CLI command reference:

http//www.cisco.com/c/en/us/support/switches/nexus-3000-series-switches/products-command-reference-list.html

CLI Output
Switch# show ip pim df 
Bidir-PIM Designated Forwarder Information for VRF "default"

RP Address (ordinal)   RP Metric        Group Range
10.8.255.89 (2)        [-1/-1]          239.110.0.0/16

  Interface            DF Address       DF State   DF Metric    DF Uptime
  Vlan253              0.0.0.0          Loser      [-1/-1]      1w0d
Vlan50 0.0.0.0 Loser [-1/-1] 1w0d
Vlan8 0.0.0.0 Loser [-1/-1] 1w0d
Lo0 0.0.0.0 Loser [-1/-1] 1w0d
Eth1/1 0.0.0.0 Loser [-1/-1] 6d12h
Eth1/2 0.0.0.0 Loser [-1/-1] 1w0d
Eth1/4 0.0.0.0 Loser [-1/-1] 1w0d
RP Address (ordinal) RP Metric Group Range 10.28.255.4 (1) [-1/-1] 239.100.0.0/16 239.111.0.0/16 239.108.0.0/16 Interface DF Address DF State DF Metric DF Uptime Vlan253 0.0.0.0 Loser [-1/-1] 1w0d
Vlan50 0.0.0.0 Loser [-1/-1] 1w0d
Vlan8 0.0.0.0 Loser [-1/-1] 1w0d
Lo0 0.0.0.0 Loser [-1/-1] 1w0d
Eth1/1 0.0.0.0 Loser [-1/-1] 6d12h
Eth1/2 0.0.0.0 Loser [-1/-1] 1w0d
Eth1/4 0.0.0.0 Loser [-1/-1] 1w0d

show ip pim group-range

show ip pim group-range

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 ip pim group-range ",
  "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": {
        "outputs": {
            "output": {
                "body": {
                    "TABLE_vrf": {
                        "ROW_vrf": {
                            "TABLE_group": {
                                "ROW_group": [
                                    {
                                        "action": "Accept", 
                                        "grp-addr": "232.0.0.0/8", 
                                        "mode": "SSM", 
                                        "origin": "Local", 
                                        "rp-addr": "-", 
                                        "sh-tree-only-range": "-"
                                    }, 
                                    {
                                        "action": "-", 
                                        "grp-addr": "224.0.1.39/32", 
                                        "mode": "Unknown", 
                                        "origin": "-", 
                                        "rp-addr": "-", 
                                        "sh-tree-only-range": "-"
                                    }, 
                                    {
                                        "action": "-", 
                                        "grp-addr": "224.0.1.40/32", 
                                        "mode": "Unknown", 
                                        "origin": "-", 
                                        "rp-addr": "-", 
                                        "sh-tree-only-range": "-"
                                    }, 
                                    {
                                        "action": "-", 
                                        "grp-addr": "239.0.0.0/16", 
                                        "mode": "ASM", 
                                        "origin": "Static", 
                                        "rp-addr": "7.57.255.1", 
                                        "sh-tree-only-range": "-"
                                    }, 
                                    {
                                        "action": "-", 
                                        "grp-addr": "239.99.0.0/16", 
                                        "mode": "ASM", 
                                        "origin": "Static", 
                                        "rp-addr": "10.8.255.3", 
                                        "sh-tree-only-range": "-"
                                    }, 
                                    {
                                        "action": "Accept", 
                                        "grp-addr": "239.128.0.0/16", 
                                        "mode": "ASM", 
                                        "origin": "Static", 
                                        "rp-addr": "7.8.255.7", 
                                        "sh-tree-only-range": "239.128.0.0/16"
                                    }, 
                                    {
                                        "action": "-", 
                                        "grp-addr": "239.255.0.0/16", 
                                        "mode": "ASM", 
                                        "origin": "Static", 
                                        "rp-addr": "7.57.255.1", 
                                        "sh-tree-only-range": "-"
                                    }, 
                                    {
                                        "action": "-", 
                                        "grp-addr": "239.100.0.0/16", 
                                        "mode": "Bidir", 
                                        "origin": "Static", 
                                        "rp-addr": "10.28.255.4", 
                                        "sh-tree-only-range": "-"
                                    }, 
                                    {
                                        "action": "-", 
                                        "grp-addr": "239.108.0.0/16", 
                                        "mode": "Bidir", 
                                        "origin": "Static", 
                                        "rp-addr": "10.28.255.4", 
                                        "sh-tree-only-range": "-"
                                    }, 
                                    {
                                        "action": "-", 
                                        "grp-addr": "239.110.0.0/16", 
                                        "mode": "Bidir", 
                                        "origin": "Static", 
                                        "rp-addr": "10.8.255.89", 
                                        "sh-tree-only-range": "-"
                                    }, 
                                    {
                                        "action": "-", 
                                        "grp-addr": "239.111.0.0/16", 
                                        "mode": "Bidir", 
                                        "origin": "Static", 
                                        "rp-addr": "10.28.255.4", 
                                        "sh-tree-only-range": "-"
                                    }
                                ]
                            }, 
                            "out-context": "default"
                        }
                    }
                }, 
                "code": "200", 
                "input": "show ip pim group-range ", 
                "msg": "Success"
            }
        }, 
        "sid": "eoc", 
        "type": "cli_show", 
        "version": "1.0"
    }
}

The CLI output example below corresponds to the payload example in the code pane on the right. For more information about the show ip pim group-range command, see the CLI command reference:

http//www.cisco.com/c/en/us/support/switches/nexus-3000-series-switches/products-command-reference-list.html

CLI Output
Switch# show ip pim group-range 
PIM Group-Range Configuration for VRF "default"
Group-range        Action Mode  RP-address      Shrd-tree-range   Origin
232.0.0.0/8 Accept SSM - - Local
224.0.1.39/32 - Unknown- - -
224.0.1.40/32 - Unknown- - -
239.0.0.0/16 - ASM 7.57.255.1 - Static
239.99.0.0/16 - ASM 10.8.255.3 - Static
239.128.0.0/16 Accept ASM 7.8.255.7 239.128.0.0/16 Static
239.255.0.0/16 - ASM 7.57.255.1 - Static
239.100.0.0/16 - Bidir 10.28.255.4 - Static
239.108.0.0/16 - Bidir 10.28.255.4 - Static
239.110.0.0/16 - Bidir 10.8.255.89 - Static
239.111.0.0/16 - Bidir 10.28.255.4 - Static

show ip pim interface

show ip pim interface

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 ip pim interface ",
  "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": {
        "outputs": {
            "output": {
                "body": {
                    "TABLE_vrf": {
                        "ROW_vrf": {
                            "TABLE_iod": {
                                "ROW_iod": [
                                    {
                                        "assert-rcvd": "0", 
                                        "assert-sent": "0", 
                                        "auth-failed": "0", 
                                        "cksum-errors": "0", 
                                        "df-backoff-rcvd": "0", 
                                        "df-backoff-sent": "0", 
                                        "df-offer-rcvd": "6", 
                                        "df-offer-sent": "6", 
                                        "df-winner-rcvd": "0", 
                                        "df-winner-sent": "0", 
                                        "dr-priority": "1", 
                                        "genid": "2dee355c", 
                                        "graft-ack-rcvd": "0", 
                                        "graft-ack-sent": "0", 
                                        "graft-rcvd": "0", 
                                        "graft-sent": "0", 
                                        "hello-early-sent": "0", 
                                        "hello-interval-sec": "30", 
                                        "hello-rcvd": "22728", 
                                        "hello-sent": "22722", 
                                        "hello-timer": "00:00:06", 
                                        "holdtime-sec": "105", 
                                        "if-addr-summary": "  IP address: 7.57.253.2, IP subnet: 7.57.253.0/30", 
                                        "if-conf-delay": "3", 
                                        "if-conf-dr-priority": "1", 
                                        "if-name": "Vlan253", 
                                        "if-status": "protocol-up/link-up/admin-up", 
                                        "invalid-df-errors": "0", 
                                        "invalid-errors": "0", 
                                        "is-auto-enabled": "no", 
                                        "is-border": "false", 
                                        "is-passive": "false", 
                                        "is-pim-vpc-svi": "no", 
                                        "isauth-config": "false", 
                                        "jp-in-policy-filter": "0", 
                                        "jp-in-policy-name": "none configured", 
                                        "jp-interval": "1", 
                                        "jp-next-send": "0", 
                                        "jp-out-policy-filter": "0", 
                                        "jp-out-policy-name": "none configured", 
                                        "jp-rcvd": "0", 
                                        "jp-rcvd-for-bidir": "0", 
                                        "jp-rcvd-for-ssm": "0", 
                                        "jp-rcvd-no-rp": "0", 
                                        "jp-rcvd-on-rpf": "0", 
                                        "jp-rcvd-wrong-rp": "0", 
                                        "jp-sent": "115", 
                                        "last-cleared": "never", 
                                        "nbr-cnt": "1", 
                                        "nbr-policy-name": "none configured", 
                                        "pak-len-errors": "0", 
                                        "pass-rcvd": "0", 
                                        "pass-sent": "0", 
                                        "pim-bfd-enabled": "no", 
                                        "pim-dr-address": "7.57.253.2", 
                                        "pkts-non-nbr": "0", 
                                        "pkts-on-passive": "0", 
                                        "pkts-self": "0", 
                                        "ver-errors": "0"
                                    }, 
                                    {
                                        "assert-rcvd": "0", 
                                        "assert-sent": "0", 
                                        "auth-failed": "0", 
                                        "cksum-errors": "0", 
                                        "df-backoff-rcvd": "0", 
                                        "df-backoff-sent": "0", 
                                        "df-offer-rcvd": "6", 
                                        "df-offer-sent": "6", 
                                        "df-winner-rcvd": "0", 
                                        "df-winner-sent": "0", 
                                        "dr-priority": "1", 
                                        "genid": "2de184fd", 
                                        "graft-ack-rcvd": "0", 
                                        "graft-ack-sent": "0", 
                                        "graft-rcvd": "0", 
                                        "graft-sent": "0", 
                                        "hello-early-sent": "0", 
                                        "hello-interval-sec": "30", 
                                        "hello-rcvd": "22744", 
                                        "hello-sent": "22735", 
                                        "hello-timer": "00:00:17", 
                                        "holdtime-sec": "105", 
                                        "if-addr-summary": "  IP address: 10.57.50.4, IP subnet: 10.57.50.0/24", 
                                        "if-conf-delay": "3", 
                                        "if-conf-dr-priority": "1", 
                                        "if-name": "Vlan50", 
                                        "if-status": "protocol-up/link-up/admin-up", 
                                        "invalid-df-errors": "0", 
                                        "invalid-errors": "0", 
                                        "is-auto-enabled": "no", 
                                        "is-border": "false", 
                                        "is-passive": "false", 
                                        "is-pim-vpc-svi": "no", 
                                        "isauth-config": "false", 
                                        "jp-in-policy-filter": "0", 
                                        "jp-in-policy-name": "none configured", 
                                        "jp-interval": "1", 
                                        "jp-next-send": "0", 
                                        "jp-out-policy-filter": "0", 
                                        "jp-out-policy-name": "none configured", 
                                        "jp-rcvd": "741", 
                                        "jp-rcvd-for-bidir": "0", 
                                        "jp-rcvd-for-ssm": "0", 
                                        "jp-rcvd-no-rp": "0", 
                                        "jp-rcvd-on-rpf": "230", 
                                        "jp-rcvd-wrong-rp": "0", 
                                        "jp-sent": "0", 
                                        "last-cleared": "never", 
                                        "nbr-cnt": "1", 
                                        "nbr-policy-name": "none configured", 
                                        "pak-len-errors": "0", 
                                        "pass-rcvd": "0", 
                                        "pass-sent": "0", 
                                        "pim-bfd-enabled": "no", 
                                        "pim-dr-address": "10.57.50.4", 
                                        "pkts-non-nbr": "0", 
                                        "pkts-on-passive": "0", 
                                        "pkts-self": "0", 
                                        "ver-errors": "0"
                                    }, 
                                    {
                                        "assert-rcvd": "0", 
                                        "assert-sent": "0", 
                                        "auth-failed": "0", 
                                        "cksum-errors": "0", 
                                        "df-backoff-rcvd": "0", 
                                        "df-backoff-sent": "0", 
                                        "df-offer-rcvd": "0", 
                                        "df-offer-sent": "0", 
                                        "df-winner-rcvd": "0", 
                                        "df-winner-sent": "0", 
                                        "dr-priority": "1", 
                                        "genid": "1e6d46d5", 
                                        "graft-ack-rcvd": "0", 
                                        "graft-ack-sent": "0", 
                                        "graft-rcvd": "0", 
                                        "graft-sent": "0", 
                                        "hello-early-sent": "0", 
                                        "hello-interval-sec": "30", 
                                        "hello-rcvd": "0", 
                                        "hello-sent": "22744", 
                                        "hello-timer": "00:00:05", 
                                        "holdtime-sec": "105", 
                                        "if-addr-summary": "  IP address: 10.57.8.3, IP subnet: 10.57.8.0/22", 
                                        "if-conf-delay": "3", 
                                        "if-conf-dr-priority": "1", 
                                        "if-name": "Vlan8", 
                                        "if-status": "protocol-up/link-up/admin-up", 
                                        "invalid-df-errors": "0", 
                                        "invalid-errors": "0", 
                                        "is-auto-enabled": "no", 
                                        "is-border": "false", 
                                        "is-passive": "false", 
                                        "is-pim-vpc-svi": "no", 
                                        "isauth-config": "false", 
                                        "jp-in-policy-filter": "0", 
                                        "jp-in-policy-name": "none configured", 
                                        "jp-interval": "1", 
                                        "jp-next-send": "0", 
                                        "jp-out-policy-filter": "0", 
                                        "jp-out-policy-name": "none configured", 
                                        "jp-rcvd": "0", 
                                        "jp-rcvd-for-bidir": "0", 
                                        "jp-rcvd-for-ssm": "0", 
                                        "jp-rcvd-no-rp": "0", 
                                        "jp-rcvd-on-rpf": "0", 
                                        "jp-rcvd-wrong-rp": "0", 
                                        "jp-sent": "0", 
                                        "last-cleared": "never", 
                                        "nbr-cnt": "0", 
                                        "nbr-policy-name": "none configured", 
                                        "pak-len-errors": "0", 
                                        "pass-rcvd": "0", 
                                        "pass-sent": "0", 
                                        "pim-bfd-enabled": "no", 
                                        "pim-dr-address": "10.57.8.3", 
                                        "pkts-non-nbr": "0", 
                                        "pkts-on-passive": "0", 
                                        "pkts-self": "22736", 
                                        "ver-errors": "0"
                                    }, 
                                    {
                                        "assert-rcvd": "0", 
                                        "assert-sent": "0", 
                                        "auth-failed": "0", 
                                        "cksum-errors": "0", 
                                        "df-backoff-rcvd": "0", 
                                        "df-backoff-sent": "0", 
                                        "df-offer-rcvd": "0", 
                                        "df-offer-sent": "0", 
                                        "df-winner-rcvd": "0", 
                                        "df-winner-sent": "0", 
                                        "dr-priority": "1", 
                                        "genid": "38046097", 
                                        "graft-ack-rcvd": "0", 
                                        "graft-ack-sent": "0", 
                                        "graft-rcvd": "0", 
                                        "graft-sent": "0", 
                                        "hello-early-sent": "0", 
                                        "hello-interval-sec": "30", 
                                        "hello-rcvd": "0", 
                                        "hello-sent": "22729", 
                                        "hello-timer": "00:00:08", 
                                        "holdtime-sec": "105", 
                                        "if-addr-summary": "  IP address: 7.57.255.2, IP subnet: 7.57.255.2/32", 
                                        "if-conf-delay": "3", 
                                        "if-conf-dr-priority": "1", 
                                        "if-name": "loopback0", 
                                        "if-status": "protocol-up/link-up/admin-up", 
                                        "invalid-df-errors": "0", 
                                        "invalid-errors": "0", 
                                        "is-auto-enabled": "no", 
                                        "is-border": "false", 
                                        "is-passive": "false", 
                                        "is-pim-vpc-svi": "no", 
                                        "isauth-config": "false", 
                                        "jp-in-policy-filter": "0", 
                                        "jp-in-policy-name": "none configured", 
                                        "jp-interval": "1", 
                                        "jp-next-send": "0", 
                                        "jp-out-policy-filter": "0", 
                                        "jp-out-policy-name": "none configured", 
                                        "jp-rcvd": "0", 
                                        "jp-rcvd-for-bidir": "0", 
                                        "jp-rcvd-for-ssm": "0", 
                                        "jp-rcvd-no-rp": "0", 
                                        "jp-rcvd-on-rpf": "0", 
                                        "jp-rcvd-wrong-rp": "0", 
                                        "jp-sent": "0", 
                                        "last-cleared": "never", 
                                        "nbr-cnt": "0", 
                                        "nbr-policy-name": "none configured", 
                                        "pak-len-errors": "0", 
                                        "pass-rcvd": "0", 
                                        "pass-sent": "0", 
                                        "pim-bfd-enabled": "no", 
                                        "pim-dr-address": "7.57.255.2", 
                                        "pkts-non-nbr": "0", 
                                        "pkts-on-passive": "0", 
                                        "pkts-self": "0", 
                                        "ver-errors": "0"
                                    }, 
                                    {
                                        "assert-rcvd": "0", 
                                        "assert-sent": "0", 
                                        "auth-failed": "0", 
                                        "cksum-errors": "0", 
                                        "df-backoff-rcvd": "0", 
                                        "df-backoff-sent": "0", 
                                        "df-offer-rcvd": "0", 
                                        "df-offer-sent": "0", 
                                        "df-winner-rcvd": "0", 
                                        "df-winner-sent": "0", 
                                        "dr-priority": "1", 
                                        "genid": "1f1d7cbe", 
                                        "graft-ack-rcvd": "0", 
                                        "graft-ack-sent": "0", 
                                        "graft-rcvd": "0", 
                                        "graft-sent": "0", 
                                        "hello-early-sent": "0", 
                                        "hello-interval-sec": "30", 
                                        "hello-rcvd": "0", 
                                        "hello-sent": "22744", 
                                        "hello-timer": "00:00:22", 
                                        "holdtime-sec": "105", 
                                        "if-addr-summary": "  IP address: 10.100.90.129, IP subnet: 10.100.90.128/30", 
                                        "if-conf-delay": "3", 
                                        "if-conf-dr-priority": "1", 
                                        "if-name": "Ethernet1/1", 
                                        "if-status": "protocol-up/link-up/admin-up", 
                                        "invalid-df-errors": "0", 
                                        "invalid-errors": "0", 
                                        "is-auto-enabled": "no", 
                                        "is-border": "false", 
                                        "is-passive": "false", 
                                        "is-pim-vpc-svi": "no", 
                                        "isauth-config": "false", 
                                        "jp-in-policy-filter": "0", 
                                        "jp-in-policy-name": "none configured", 
                                        "jp-interval": "1", 
                                        "jp-next-send": "0", 
                                        "jp-out-policy-filter": "0", 
                                        "jp-out-policy-name": "none configured", 
                                        "jp-rcvd": "0", 
                                        "jp-rcvd-for-bidir": "0", 
                                        "jp-rcvd-for-ssm": "0", 
                                        "jp-rcvd-no-rp": "0", 
                                        "jp-rcvd-on-rpf": "0", 
                                        "jp-rcvd-wrong-rp": "0", 
                                        "jp-sent": "0", 
                                        "last-cleared": "never", 
                                        "nbr-cnt": "0", 
                                        "nbr-policy-name": "none configured", 
                                        "pak-len-errors": "0", 
                                        "pass-rcvd": "0", 
                                        "pass-sent": "0", 
                                        "pim-bfd-enabled": "no", 
                                        "pim-dr-address": "10.100.90.129", 
                                        "pkts-non-nbr": "0", 
                                        "pkts-on-passive": "0", 
                                        "pkts-self": "0", 
                                        "ver-errors": "0"
                                    }, 
                                    {
                                        "assert-rcvd": "0", 
                                        "assert-sent": "0", 
                                        "auth-failed": "0", 
                                        "cksum-errors": "0", 
                                        "df-backoff-rcvd": "0", 
                                        "df-backoff-sent": "0", 
                                        "df-offer-rcvd": "6", 
                                        "df-offer-sent": "0", 
                                        "df-winner-rcvd": "0", 
                                        "df-winner-sent": "0", 
                                        "dr-priority": "1", 
                                        "genid": "13e2791d", 
                                        "graft-ack-rcvd": "0", 
                                        "graft-ack-sent": "0", 
                                        "graft-rcvd": "0", 
                                        "graft-sent": "0", 
                                        "hello-early-sent": "0", 
                                        "hello-interval-sec": "30", 
                                        "hello-rcvd": "22740", 
                                        "hello-sent": "22736", 
                                        "hello-timer": "00:00:18", 
                                        "holdtime-sec": "105", 
                                        "if-addr-summary": "  IP address: 10.100.157.2, IP subnet: 10.100.157.0/30", 
                                        "if-conf-delay": "3", 
                                        "if-conf-dr-priority": "1", 
                                        "if-name": "Ethernet1/2", 
                                        "if-status": "protocol-up/link-up/admin-up", 
                                        "invalid-df-errors": "0", 
                                        "invalid-errors": "0", 
                                        "is-auto-enabled": "no", 
                                        "is-border": "false", 
                                        "is-passive": "false", 
                                        "is-pim-vpc-svi": "no", 
                                        "isauth-config": "false", 
                                        "jp-in-policy-filter": "0", 
                                        "jp-in-policy-name": "none configured", 
                                        "jp-interval": "1", 
                                        "jp-next-send": "0", 
                                        "jp-out-policy-filter": "0", 
                                        "jp-out-policy-name": "none configured", 
                                        "jp-rcvd": "0", 
                                        "jp-rcvd-for-bidir": "0", 
                                        "jp-rcvd-for-ssm": "0", 
                                        "jp-rcvd-no-rp": "0", 
                                        "jp-rcvd-on-rpf": "0", 
                                        "jp-rcvd-wrong-rp": "0", 
                                        "jp-sent": "9657", 
                                        "last-cleared": "never", 
                                        "nbr-cnt": "1", 
                                        "nbr-policy-name": "none configured", 
                                        "pak-len-errors": "0", 
                                        "pass-rcvd": "0", 
                                        "pass-sent": "0", 
                                        "pim-bfd-enabled": "no", 
                                        "pim-dr-address": "10.100.157.2", 
                                        "pkts-non-nbr": "0", 
                                        "pkts-on-passive": "0", 
                                        "pkts-self": "0", 
                                        "ver-errors": "0"
                                    }, 
                                    {
                                        "assert-rcvd": "0", 
                                        "assert-sent": "0", 
                                        "auth-failed": "0", 
                                        "cksum-errors": "0", 
                                        "df-backoff-rcvd": "0", 
                                        "df-backoff-sent": "0", 
                                        "df-offer-rcvd": "0", 
                                        "df-offer-sent": "0", 
                                        "df-winner-rcvd": "0", 
                                        "df-winner-sent": "0", 
                                        "dr-priority": "1", 
                                        "genid": "2b7c9012", 
                                        "graft-ack-rcvd": "0", 
                                        "graft-ack-sent": "0", 
                                        "graft-rcvd": "0", 
                                        "graft-sent": "0", 
                                        "hello-early-sent": "0", 
                                        "hello-interval-sec": "30", 
                                        "hello-rcvd": "0", 
                                        "hello-sent": "0", 
                                        "hello-timer": "0.000000", 
                                        "holdtime-sec": "105", 
                                        "if-addr-summary": "  IP address: none", 
                                        "if-conf-delay": "3", 
                                        "if-conf-dr-priority": "1", 
                                        "if-name": "Ethernet1/3", 
                                        "if-status": "protocol-down/link-down/admin-up", 
                                        "invalid-df-errors": "0", 
                                        "invalid-errors": "0", 
                                        "is-auto-enabled": "no", 
                                        "is-border": "false", 
                                        "is-passive": "false", 
                                        "is-pim-vpc-svi": "no", 
                                        "isauth-config": "false", 
                                        "jp-in-policy-filter": "0", 
                                        "jp-in-policy-name": "none configured", 
                                        "jp-interval": "1", 
                                        "jp-next-send": "0", 
                                        "jp-out-policy-filter": "0", 
                                        "jp-out-policy-name": "none configured", 
                                        "jp-rcvd": "0", 
                                        "jp-rcvd-for-bidir": "0", 
                                        "jp-rcvd-for-ssm": "0", 
                                        "jp-rcvd-no-rp": "0", 
                                        "jp-rcvd-on-rpf": "0", 
                                        "jp-rcvd-wrong-rp": "0", 
                                        "jp-sent": "0", 
                                        "last-cleared": "never", 
                                        "nbr-cnt": "0", 
                                        "nbr-policy-name": "none configured", 
                                        "pak-len-errors": "0", 
                                        "pass-rcvd": "0", 
                                        "pass-sent": "0", 
                                        "pim-bfd-enabled": "no", 
                                        "pim-dr-address": "0.0.0.0", 
                                        "pkts-non-nbr": "0", 
                                        "pkts-on-passive": "0", 
                                        "pkts-self": "0", 
                                        "ver-errors": "0"
                                    }, 
                                    {
                                        "assert-rcvd": "0", 
                                        "assert-sent": "0", 
                                        "auth-failed": "0", 
                                        "cksum-errors": "0", 
                                        "df-backoff-rcvd": "0", 
                                        "df-backoff-sent": "0", 
                                        "df-offer-rcvd": "6", 
                                        "df-offer-sent": "6", 
                                        "df-winner-rcvd": "0", 
                                        "df-winner-sent": "0", 
                                        "dr-priority": "1", 
                                        "genid": "152657d2", 
                                        "graft-ack-rcvd": "0", 
                                        "graft-ack-sent": "0", 
                                        "graft-rcvd": "0", 
                                        "graft-sent": "0", 
                                        "hello-early-sent": "0", 
                                        "hello-interval-sec": "30", 
                                        "hello-rcvd": "22737", 
                                        "hello-sent": "22732", 
                                        "hello-timer": "0.631175", 
                                        "holdtime-sec": "105", 
                                        "if-addr-summary": "  IP address: 10.100.157.10, IP subnet: 10.100.157.8/30", 
                                        "if-conf-delay": "3", 
                                        "if-conf-dr-priority": "1", 
                                        "if-name": "Ethernet1/4", 
                                        "if-status": "protocol-up/link-up/admin-up", 
                                        "invalid-df-errors": "0", 
                                        "invalid-errors": "0", 
                                        "is-auto-enabled": "no", 
                                        "is-border": "false", 
                                        "is-passive": "false", 
                                        "is-pim-vpc-svi": "no", 
                                        "isauth-config": "false", 
                                        "jp-in-policy-filter": "0", 
                                        "jp-in-policy-name": "none configured", 
                                        "jp-interval": "1", 
                                        "jp-next-send": "0", 
                                        "jp-out-policy-filter": "0", 
                                        "jp-out-policy-name": "none configured", 
                                        "jp-rcvd": "0", 
                                        "jp-rcvd-for-bidir": "0", 
                                        "jp-rcvd-for-ssm": "0", 
                                        "jp-rcvd-no-rp": "0", 
                                        "jp-rcvd-on-rpf": "0", 
                                        "jp-rcvd-wrong-rp": "0", 
                                        "jp-sent": "9643", 
                                        "last-cleared": "never", 
                                        "nbr-cnt": "1", 
                                        "nbr-policy-name": "none configured", 
                                        "pak-len-errors": "0", 
                                        "pass-rcvd": "0", 
                                        "pass-sent": "0", 
                                        "pim-bfd-enabled": "no", 
                                        "pim-dr-address": "10.100.157.10", 
                                        "pkts-non-nbr": "0", 
                                        "pkts-on-passive": "0", 
                                        "pkts-self": "0", 
                                        "ver-errors": "0"
                                    }, 
                                    {
                                        "assert-rcvd": "0", 
                                        "assert-sent": "0", 
                                        "auth-failed": "0", 
                                        "cksum-errors": "0", 
                                        "df-backoff-rcvd": "0", 
                                        "df-backoff-sent": "0", 
                                        "df-offer-rcvd": "0", 
                                        "df-offer-sent": "0", 
                                        "df-winner-rcvd": "0", 
                                        "df-winner-sent": "0", 
                                        "dr-priority": "1", 
                                        "genid": "23b4d74e", 
                                        "graft-ack-rcvd": "0", 
                                        "graft-ack-sent": "0", 
                                        "graft-rcvd": "0", 
                                        "graft-sent": "0", 
                                        "hello-early-sent": "0", 
                                        "hello-interval-sec": "30", 
                                        "hello-rcvd": "0", 
                                        "hello-sent": "0", 
                                        "hello-timer": "0.000000", 
                                        "holdtime-sec": "105", 
                                        "if-addr-summary": "  IP address: none", 
                                        "if-conf-delay": "3", 
                                        "if-conf-dr-priority": "1", 
                                        "if-name": "Ethernet1/13", 
                                        "if-status": "protocol-up/link-up/admin-up", 
                                        "invalid-df-errors": "0", 
                                        "invalid-errors": "0", 
                                        "is-auto-enabled": "no", 
                                        "is-border": "false", 
                                        "is-passive": "false", 
                                        "is-pim-vpc-svi": "no", 
                                        "isauth-config": "false", 
                                        "jp-in-policy-filter": "0", 
                                        "jp-in-policy-name": "none configured", 
                                        "jp-interval": "1", 
                                        "jp-next-send": "0", 
                                        "jp-out-policy-filter": "0", 
                                        "jp-out-policy-name": "none configured", 
                                        "jp-rcvd": "0", 
                                        "jp-rcvd-for-bidir": "0", 
                                        "jp-rcvd-for-ssm": "0", 
                                        "jp-rcvd-no-rp": "0", 
                                        "jp-rcvd-on-rpf": "0", 
                                        "jp-rcvd-wrong-rp": "0", 
                                        "jp-sent": "0", 
                                        "last-cleared": "never", 
                                        "nbr-cnt": "0", 
                                        "nbr-policy-name": "none configured", 
                                        "pak-len-errors": "0", 
                                        "pass-rcvd": "0", 
                                        "pass-sent": "0", 
                                        "pim-bfd-enabled": "no", 
                                        "pim-dr-address": "0.0.0.0", 
                                        "pkts-non-nbr": "0", 
                                        "pkts-on-passive": "0", 
                                        "pkts-self": "0", 
                                        "ver-errors": "0"
                                    }
                                ]
                            }, 
                            "vrf-name": "default"
                        }
                    }
                }, 
                "code": "200", 
                "input": "show ip pim interface ", 
                "msg": "Success"
            }
        }, 
        "sid": "eoc", 
        "type": "cli_show", 
        "version": "1.0"
    }
}

The CLI output example below corresponds to the payload example in the code pane on the right. For more information about the show ip pim interface command, see the CLI command reference:

http//www.cisco.com/c/en/us/support/switches/nexus-3000-series-switches/products-command-reference-list.html

CLI Output
Switch# show ip pim interface 
PIM Interface Status for VRF "default"
Vlan253, Interface status: protocol-up/link-up/admin-up
  IP address: 7.57.253.2, IP subnet: 7.57.253.0/30
  PIM DR: 7.57.253.2, DR's priority: 1
  PIM neighbor count: 1
  PIM hello interval: 30 secs, next hello sent in: 00:00:04
  PIM neighbor holdtime: 105 secs
  PIM configured DR priority: 1
  PIM configured DR delay: 3 secs
  PIM border interface: no
  PIM GenID sent in Hellos: 0x2dee355c
  PIM Hello MD5-AH Authentication: disabled
  PIM Neighbor policy: none configured
  PIM Join-Prune inbound policy: none configured
  PIM Join-Prune outbound policy: none configured
  PIM Join-Prune interval: 1 minutes
  PIM Join-Prune next sending: 0 minutes
  PIM BFD enabled: no
  PIM passive interface: no
  PIM VPC SVI: no
  PIM Auto Enabled: no
  PIM Interface Statistics, last reset: never
    General (sent/received):
      Hellos: 22722/22728 (early: 0), JPs: 115/0, Asserts: 0/0
      Grafts: 0/0, Graft-Acks: 0/0
      DF-Offers: 6/6, DF-Winners: 0/0, DF-Backoffs: 0/0, DF-Passes: 0/0
    Errors:
      Checksum errors: 0, Invalid packet types/DF subtypes: 0/0
      Authentication failed: 0
      Packet length errors: 0, Bad version packets: 0, Packets from self: 0
      Packets from non-neighbors: 0
          Packets received on passiveinterface: 0
      JPs received on RPF-interface: 0
      (,G) Joins received with no/wrong RP: 0/0
      (,G)/(S,G) JPs received for SSM/Bidir groups: 0/0
      JPs filtered by inbound policy: 0
      JPs filtered by outbound policy: 0
Vlan50, Interface status: protocol-up/link-up/admin-up
  IP address: 10.57.50.4, IP subnet: 10.57.50.0/24
  PIM DR: 10.57.50.4, DR's priority: 1
  PIM neighbor count: 1
  PIM hello interval: 30 secs, next hello sent in: 00:00:15
  PIM neighbor holdtime: 105 secs
  PIM configured DR priority: 1
  PIM configured DR delay: 3 secs
  PIM border interface: no
  PIM GenID sent in Hellos: 0x2de184fd
  PIM Hello MD5-AH Authentication: disabled
  PIM Neighbor policy: none configured
  PIM Join-Prune inbound policy: none configured
  PIM Join-Prune outbound policy: none configured
  PIM Join-Prune interval: 1 minutes
  PIM Join-Prune next sending: 0 minutes
  PIM BFD enabled: no
  PIM passive interface: no
  PIM VPC SVI: no
  PIM Auto Enabled: no
  PIM Interface Statistics, last reset: never
    General (sent/received):
      Hellos: 22735/22744 (early: 0), JPs: 0/741, Asserts: 0/0
      Grafts: 0/0, Graft-Acks: 0/0
      DF-Offers: 6/6, DF-Winners: 0/0, DF-Backoffs: 0/0, DF-Passes: 0/0
    Errors:
      Checksum errors: 0, Invalid packet types/DF subtypes: 0/0
      Authentication failed: 0
      Packet length errors: 0, Bad version packets: 0, Packets from self: 0
      Packets from non-neighbors: 0
          Packets received on passiveinterface: 0
      JPs received on RPF-interface: 230
      (,G) Joins received with no/wrong RP: 0/0
      (,G)/(S,G) JPs received for SSM/Bidir groups: 0/0
      JPs filtered by inbound policy: 0
      JPs filtered by outbound policy: 0
Vlan8, Interface status: protocol-up/link-up/admin-up
  IP address: 10.57.8.3, IP subnet: 10.57.8.0/22
  PIM DR: 10.57.8.3, DR's priority: 1
  PIM neighbor count: 0
  PIM hello interval: 30 secs, next hello sent in: 00:00:03
  PIM neighbor holdtime: 105 secs
  PIM configured DR priority: 1
  PIM configured DR delay: 3 secs
  PIM border interface: no
  PIM GenID sent in Hellos: 0x1e6d46d5
  PIM Hello MD5-AH Authentication: disabled
  PIM Neighbor policy: none configured
  PIM Join-Prune inbound policy: none configured
  PIM Join-Prune outbound policy: none configured
  PIM Join-Prune interval: 1 minutes
  PIM Join-Prune next sending: 0 minutes
  PIM BFD enabled: no
  PIM passive interface: no
  PIM VPC SVI: no
  PIM Auto Enabled: no
  PIM Interface Statistics, last reset: never
    General (sent/received):
      Hellos: 22744/0 (early: 0), JPs: 0/0, Asserts: 0/0
      Grafts: 0/0, Graft-Acks: 0/0
      DF-Offers: 0/0, DF-Winners: 0/0, DF-Backoffs: 0/0, DF-Passes: 0/0
    Errors:
      Checksum errors: 0, Invalid packet types/DF subtypes: 0/0
      Authentication failed: 0
      Packet length errors: 0, Bad version packets: 0, Packets from self: 22736
      Packets from non-neighbors: 0
          Packets received on passiveinterface: 0
      JPs received on RPF-interface: 0
      (,G) Joins received with no/wrong RP: 0/0
      (,G)/(S,G) JPs received for SSM/Bidir groups: 0/0
      JPs filtered by inbound policy: 0
      JPs filtered by outbound policy: 0
loopback0, Interface status: protocol-up/link-up/admin-up
  IP address: 7.57.255.2, IP subnet: 7.57.255.2/32
  PIM DR: 7.57.255.2, DR's priority: 1
  PIM neighbor count: 0
  PIM hello interval: 30 secs, next hello sent in: 00:00:06
  PIM neighbor holdtime: 105 secs
  PIM configured DR priority: 1
  PIM configured DR delay: 3 secs
  PIM border interface: no
  PIM GenID sent in Hellos: 0x38046097
  PIM Hello MD5-AH Authentication: disabled
  PIM Neighbor policy: none configured
  PIM Join-Prune inbound policy: none configured
  PIM Join-Prune outbound policy: none configured
  PIM Join-Prune interval: 1 minutes
  PIM Join-Prune next sending: 0 minutes
  PIM BFD enabled: no
  PIM passive interface: no
  PIM VPC SVI: no
  PIM Auto Enabled: no
  PIM Interface Statistics, last reset: never
    General (sent/received):
      Hellos: 22729/0 (early: 0), JPs: 0/0, Asserts: 0/0
      Grafts: 0/0, Graft-Acks: 0/0
      DF-Offers: 0/0, DF-Winners: 0/0, DF-Backoffs: 0/0, DF-Passes: 0/0
    Errors:
      Checksum errors: 0, Invalid packet types/DF subtypes: 0/0
      Authentication failed: 0
      Packet length errors: 0, Bad version packets: 0, Packets from self: 0
      Packets from non-neighbors: 0
          Packets received on passiveinterface: 0
      JPs received on RPF-interface: 0
      (,G) Joins received with no/wrong RP: 0/0
      (,G)/(S,G) JPs received for SSM/Bidir groups: 0/0
      JPs filtered by inbound policy: 0
      JPs filtered by outbound policy: 0
Ethernet1/1, Interface status: protocol-up/link-up/admin-up
  IP address: 10.100.90.129, IP subnet: 10.100.90.128/30
  PIM DR: 10.100.90.129, DR's priority: 1
  PIM neighbor count: 0
  PIM hello interval: 30 secs, next hello sent in: 00:00:20
  PIM neighbor holdtime: 105 secs
  PIM configured DR priority: 1
  PIM configured DR delay: 3 secs
  PIM border interface: no
  PIM GenID sent in Hellos: 0x1f1d7cbe
  PIM Hello MD5-AH Authentication: disabled
  PIM Neighbor policy: none configured
  PIM Join-Prune inbound policy: none configured
  PIM Join-Prune outbound policy: none configured
  PIM Join-Prune interval: 1 minutes
  PIM Join-Prune next sending: 0 minutes
  PIM BFD enabled: no
  PIM passive interface: no
  PIM VPC SVI: no
  PIM Auto Enabled: no
  PIM Interface Statistics, last reset: never
    General (sent/received):
      Hellos: 22744/0 (early: 0), JPs: 0/0, Asserts: 0/0
      Grafts: 0/0, Graft-Acks: 0/0
      DF-Offers: 0/0, DF-Winners: 0/0, DF-Backoffs: 0/0, DF-Passes: 0/0
    Errors:
      Checksum errors: 0, Invalid packet types/DF subtypes: 0/0
      Authentication failed: 0
      Packet length errors: 0, Bad version packets: 0, Packets from self: 0
      Packets from non-neighbors: 0
          Packets received on passiveinterface: 0
      JPs received on RPF-interface: 0
      (,G) Joins received with no/wrong RP: 0/0
      (,G)/(S,G) JPs received for SSM/Bidir groups: 0/0
      JPs filtered by inbound policy: 0
      JPs filtered by outbound policy: 0
Ethernet1/2, Interface status: protocol-up/link-up/admin-up
  IP address: 10.100.157.2, IP subnet: 10.100.157.0/30
  PIM DR: 10.100.157.2, DR's priority: 1
  PIM neighbor count: 1
  PIM hello interval: 30 secs, next hello sent in: 00:00:16
  PIM neighbor holdtime: 105 secs
  PIM configured DR priority: 1
  PIM configured DR delay: 3 secs
  PIM border interface: no
  PIM GenID sent in Hellos: 0x13e2791d
  PIM Hello MD5-AH Authentication: disabled
  PIM Neighbor policy: none configured
  PIM Join-Prune inbound policy: none configured
  PIM Join-Prune outbound policy: none configured
  PIM Join-Prune interval: 1 minutes
  PIM Join-Prune next sending: 0 minutes
  PIM BFD enabled: no
  PIM passive interface: no
  PIM VPC SVI: no
  PIM Auto Enabled: no
  PIM Interface Statistics, last reset: never
    General (sent/received):
      Hellos: 22736/22740 (early: 0), JPs: 9657/0, Asserts: 0/0
      Grafts: 0/0, Graft-Acks: 0/0
      DF-Offers: 0/6, DF-Winners: 0/0, DF-Backoffs: 0/0, DF-Passes: 0/0
    Errors:
      Checksum errors: 0, Invalid packet types/DF subtypes: 0/0
      Authentication failed: 0
      Packet length errors: 0, Bad version packets: 0, Packets from self: 0
      Packets from non-neighbors: 0
          Packets received on passiveinterface: 0
      JPs received on RPF-interface: 0
      (,G) Joins received with no/wrong RP: 0/0
      (,G)/(S,G) JPs received for SSM/Bidir groups: 0/0
      JPs filtered by inbound policy: 0
      JPs filtered by outbound policy: 0
Ethernet1/3, Interface status: protocol-down/link-down/admin-up
  IP address: none
  PIM DR: 0.0.0.0, DR's priority: 1
  PIM neighbor count: 0
  PIM hello interval: 30 secs, next hello sent in: 0.000000
  PIM neighbor holdtime: 105 secs
  PIM configured DR priority: 1
  PIM configured DR delay: 3 secs
  PIM border interface: no
  PIM GenID sent in Hellos: 0x2b7c9012
  PIM Hello MD5-AH Authentication: disabled
  PIM Neighbor policy: none configured
  PIM Join-Prune inbound policy: none configured
  PIM Join-Prune outbound policy: none configured
  PIM Join-Prune interval: 1 minutes
  PIM Join-Prune next sending: 0 minutes
  PIM BFD enabled: no
  PIM passive interface: no
  PIM VPC SVI: no
  PIM Auto Enabled: no
  PIM Interface Statistics, last reset: never
    General (sent/received):
      Hellos: 0/0 (early: 0), JPs: 0/0, Asserts: 0/0
      Grafts: 0/0, Graft-Acks: 0/0
      DF-Offers: 0/0, DF-Winners: 0/0, DF-Backoffs: 0/0, DF-Passes: 0/0
    Errors:
      Checksum errors: 0, Invalid packet types/DF subtypes: 0/0
      Authentication failed: 0
      Packet length errors: 0, Bad version packets: 0, Packets from self: 0
      Packets from non-neighbors: 0
          Packets received on passiveinterface: 0
      JPs received on RPF-interface: 0
      (,G) Joins received with no/wrong RP: 0/0
      (,G)/(S,G) JPs received for SSM/Bidir groups: 0/0
      JPs filtered by inbound policy: 0
      JPs filtered by outbound policy: 0
Ethernet1/4, Interface status: protocol-up/link-up/admin-up
  IP address: 10.100.157.10, IP subnet: 10.100.157.8/30
  PIM DR: 10.100.157.10, DR's priority: 1
  PIM neighbor count: 1
  PIM hello interval: 30 secs, next hello sent in: 00:00:27
  PIM neighbor holdtime: 105 secs
  PIM configured DR priority: 1
  PIM configured DR delay: 3 secs
  PIM border interface: no
  PIM GenID sent in Hellos: 0x152657d2
  PIM Hello MD5-AH Authentication: disabled
  PIM Neighbor policy: none configured
  PIM Join-Prune inbound policy: none configured
  PIM Join-Prune outbound policy: none configured
  PIM Join-Prune interval: 1 minutes
  PIM Join-Prune next sending: 0 minutes
  PIM BFD enabled: no
  PIM passive interface: no
  PIM VPC SVI: no
  PIM Auto Enabled: no
  PIM Interface Statistics, last reset: never
    General (sent/received):
      Hellos: 22733/22737 (early: 0), JPs: 9643/0, Asserts: 0/0
      Grafts: 0/0, Graft-Acks: 0/0
      DF-Offers: 6/6, DF-Winners: 0/0, DF-Backoffs: 0/0, DF-Passes: 0/0
    Errors:
      Checksum errors: 0, Invalid packet types/DF subtypes: 0/0
      Authentication failed: 0
      Packet length errors: 0, Bad version packets: 0, Packets from self: 0
      Packets from non-neighbors: 0
          Packets received on passiveinterface: 0
      JPs received on RPF-interface: 0
      (,G) Joins received with no/wrong RP: 0/0
      (,G)/(S,G) JPs received for SSM/Bidir groups: 0/0
      JPs filtered by inbound policy: 0
      JPs filtered by outbound policy: 0
Ethernet1/13, Interface status: protocol-up/link-up/admin-up
  IP address: none
  PIM DR: 0.0.0.0, DR's priority: 1
  PIM neighbor count: 0
  PIM hello interval: 30 secs, next hello sent in: 0.000000
  PIM neighbor holdtime: 105 secs
  PIM configured DR priority: 1
  PIM configured DR delay: 3 secs
  PIM border interface: no
  PIM GenID sent in Hellos: 0x23b4d74e
  PIM Hello MD5-AH Authentication: disabled
  PIM Neighbor policy: none configured
  PIM Join-Prune inbound policy: none configured
  PIM Join-Prune outbound policy: none configured
  PIM Join-Prune interval: 1 minutes
  PIM Join-Prune next sending: 0 minutes
  PIM BFD enabled: no
  PIM passive interface: no
  PIM VPC SVI: no
  PIM Auto Enabled: no
  PIM Interface Statistics, last reset: never
    General (sent/received):
      Hellos: 0/0 (early: 0), JPs: 0/0, Asserts: 0/0
      Grafts: 0/0, Graft-Acks: 0/0
      DF-Offers: 0/0, DF-Winners: 0/0, DF-Backoffs: 0/0, DF-Passes: 0/0
    Errors:
      Checksum errors: 0, Invalid packet types/DF subtypes: 0/0
      Authentication failed: 0
      Packet length errors: 0, Bad version packets: 0, Packets from self: 0
      Packets from non-neighbors: 0
          Packets received on passiveinterface: 0
      JPs received on RPF-interface: 0
      (,G) Joins received with no/wrong RP: 0/0
      (,G)/(S,G) JPs received for SSM/Bidir groups: 0/0
      JPs filtered by inbound policy: 0
      JPs filtered by outbound policy: 0

show ip pim neighbor

show ip pim neighbor

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 ip pim neighbor ",
  "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": {
        "outputs": {
            "output": {
                "body": {
                    "TABLE_vrf": {
                        "ROW_vrf": {
                            "TABLE_neighbor": {
                                "ROW_neighbor": [
                                    {
                                        "bfd-state": "n/a", 
                                        "bidir-capable": "true", 
                                        "dr-priority": "1", 
                                        "ecmp-redirect-capable": "false", 
                                        "expires": "00:01:25", 
                                        "if-name": "Vlan253", 
                                        "nbr-addr": "7.57.253.1", 
                                        "uptime": "1w0d"
                                    }, 
                                    {
                                        "bfd-state": "n/a", 
                                        "bidir-capable": "true", 
                                        "dr-priority": "1", 
                                        "ecmp-redirect-capable": "false", 
                                        "expires": "00:01:27", 
                                        "if-name": "Vlan50", 
                                        "nbr-addr": "10.57.50.3", 
                                        "uptime": "1w0d"
                                    }, 
                                    {
                                        "bfd-state": "n/a", 
                                        "bidir-capable": "true", 
                                        "dr-priority": "1", 
                                        "ecmp-redirect-capable": "false", 
                                        "expires": "00:01:19", 
                                        "if-name": "Ethernet1/2", 
                                        "nbr-addr": "10.100.157.1", 
                                        "uptime": "1w0d"
                                    }, 
                                    {
                                        "bfd-state": "n/a", 
                                        "bidir-capable": "true", 
                                        "dr-priority": "1", 
                                        "ecmp-redirect-capable": "false", 
                                        "expires": "00:01:33", 
                                        "if-name": "Ethernet1/4", 
                                        "nbr-addr": "10.100.157.9", 
                                        "uptime": "1w0d"
                                    }
                                ]
                            }, 
                            "out-context": "default"
                        }
                    }
                }, 
                "code": "200", 
                "input": "show ip pim neighbor ", 
                "msg": "Success"
            }
        }, 
        "sid": "eoc", 
        "type": "cli_show", 
        "version": "1.0"
    }
}

The CLI output example below corresponds to the payload example in the code pane on the right. For more information about the show ip pim neighbor command, see the CLI command reference:

http//www.cisco.com/c/en/us/support/switches/nexus-3000-series-switches/products-command-reference-list.html

CLI Output
Switch# show ip pim neighbor 
PIM Neighbor Status for VRF "default"
Neighbor        Interface            Uptime    Expires   DR       Bidir-  BFD    ECMP Redirect
                                                         Priority Capable State     Capable
7.57.253.1      Vlan253              1w0d      00:01:24  1        yes     n/a     no
10.57.50.3      Vlan50               1w0d      00:01:26  1        yes     n/a     no
10.100.157.1    Ethernet1/2          1w0d      00:01:19  1        yes     n/a     no
10.100.157.9    Ethernet1/4          1w0d      00:01:32  1        yes     n/a     no

show ip pim route

show ip pim route

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 ip pim route ",
  "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": {
        "outputs": {
            "output": {
                "body": {
                    "TABLE_vrf": {
                        "ROW_vrf": {
                            "TABLE_one_route": {
                                "ROW_one_route": [
                                    {
                                        "bidir": "false", 
                                        "immediate-bf-str": "00000000", 
                                        "immediate-count": "0", 
                                        "immediate-timeout-bf-str": "00000000", 
                                        "immediate-timeout-count": "0", 
                                        "intf-name": "Null", 
                                        "jp-holdtime-rndup": "3", 
                                        "mcast-addrs": "(*, 232.0.0.0/8)", 
                                        "oif-bf-str": "00000000", 
                                        "oif-count": "0", 
                                        "rp-bit": "false", 
                                        "rpf-nbr-1": "0.0.0.0", 
                                        "rpf-nbr-addr": "", 
                                        "sgexpire": "00:02:43", 
                                        "sgr-prune-list-bf-str": "00000000", 
                                        "sgr-prune-list-count": "0", 
                                        "timeout-bf-str": "00000000", 
                                        "timeout-count": "0", 
                                        "timeout-interval": "2"
                                    }, 
                                    {
                                        "bidir": "true", 
                                        "intf-name": "Null", 
                                        "jp-holdtime-rndup": "3", 
                                        "mcast-addrs": "(*, 239.100.0.0/16)", 
                                        "oif-bf-str": "00000000", 
                                        "oif-count": "0", 
                                        "rp-addr": "10.28.255.4", 
                                        "rp-bit": "true", 
                                        "rp-local": "", 
                                        "rpf-nbr-1": "0.0.0.0", 
                                        "rpf-nbr-addr": "", 
                                        "sgexpire": "00:02:46", 
                                        "timeout-bf-str": "00000000", 
                                        "timeout-count": "0", 
                                        "timeout-interval": "2"
                                    }, 
                                    {
                                        "bidir": "true", 
                                        "intf-name": "Null", 
                                        "jp-holdtime-rndup": "3", 
                                        "mcast-addrs": "(*, 239.108.0.0/16)", 
                                        "oif-bf-str": "00000000", 
                                        "oif-count": "0", 
                                        "rp-addr": "10.28.255.4", 
                                        "rp-bit": "true", 
                                        "rp-local": "", 
                                        "rpf-nbr-1": "0.0.0.0", 
                                        "rpf-nbr-addr": "", 
                                        "sgexpire": "00:02:44", 
                                        "timeout-bf-str": "00000000", 
                                        "timeout-count": "0", 
                                        "timeout-interval": "2"
                                    }, 
                                    {
                                        "bidir": "true", 
                                        "intf-name": "Null", 
                                        "jp-holdtime-rndup": "3", 
                                        "mcast-addrs": "(*, 239.110.0.0/16)", 
                                        "oif-bf-str": "00000000", 
                                        "oif-count": "0", 
                                        "rp-addr": "10.8.255.89", 
                                        "rp-bit": "true", 
                                        "rp-local": "", 
                                        "rpf-nbr-1": "0.0.0.0", 
                                        "rpf-nbr-addr": "", 
                                        "sgexpire": "00:02:47", 
                                        "timeout-bf-str": "00000000", 
                                        "timeout-count": "0", 
                                        "timeout-interval": "2"
                                    }, 
                                    {
                                        "bidir": "true", 
                                        "intf-name": "Null", 
                                        "jp-holdtime-rndup": "3", 
                                        "mcast-addrs": "(*, 239.111.0.0/16)", 
                                        "oif-bf-str": "00000000", 
                                        "oif-count": "0", 
                                        "rp-addr": "10.28.255.4", 
                                        "rp-bit": "true", 
                                        "rp-local": "", 
                                        "rpf-nbr-1": "0.0.0.0", 
                                        "rpf-nbr-addr": "", 
                                        "sgexpire": "00:02:45", 
                                        "timeout-bf-str": "00000000", 
                                        "timeout-count": "0", 
                                        "timeout-interval": "2"
                                    }
                                ]
                            }, 
                            "context-name": "default", 
                            "route-count": "5"
                        }
                    }
                }, 
                "code": "200", 
                "input": "show ip pim route ", 
                "msg": "Success"
            }
        }, 
        "sid": "eoc", 
        "type": "cli_show", 
        "version": "1.0"
    }
}

The CLI output example below corresponds to the payload example in the code pane on the right. For more information about the show ip pim route command, see the CLI command reference:

http//www.cisco.com/c/en/us/support/switches/nexus-3000-series-switches/products-command-reference-list.html

CLI Output
Switch# show ip pim route 
PIM Routing Table for VRF "default" - 5 entries

(, 232.0.0.0/8), expires 00:02:42
  Incoming interface: Null, RPF nbr 0.0.0.0 
  Oif-list:       (0) 00000000, Timeout-list: (0) 00000000
  Immediate-list: (0) 00000000, Immediate-timeout-list: (0) 00000000
  Sgr-prune-list: (0) 00000000  Timeout-interval: 2, JP-holdtime round-up: 3

(, 239.100.0.0/16), RP 10.28.255.4, bidir, expires 00:02:45, RP-bit
  Incoming interface: Null, RPF nbr 0.0.0.0 
  Oif-list: (0) 00000000, Timeout-list: (0) 00000000
  Timeout-interval: 2, JP-holdtime round-up: 3

(, 239.108.0.0/16), RP 10.28.255.4, bidir, expires 00:02:43, RP-bit
  Incoming interface: Null, RPF nbr 0.0.0.0 
  Oif-list: (0) 00000000, Timeout-list: (0) 00000000
  Timeout-interval: 2, JP-holdtime round-up: 3

(, 239.110.0.0/16), RP 10.8.255.89, bidir, expires 00:02:46, RP-bit
  Incoming interface: Null, RPF nbr 0.0.0.0 
  Oif-list: (0) 00000000, Timeout-list: (0) 00000000
  Timeout-interval: 2, JP-holdtime round-up: 3

(*, 239.111.0.0/16), RP 10.28.255.4, bidir, expires 00:02:44, RP-bit
  Incoming interface: Null, RPF nbr 0.0.0.0 
  Oif-list: (0) 00000000, Timeout-list: (0) 00000000
  Timeout-interval: 2, JP-holdtime round-up: 3


show ip pim rp

show ip pim rp

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 ip pim rp ",
  "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": {
        "outputs": {
            "output": {
                "body": {
                    "TABLE_vrf": {
                        "ROW_vrf": {
                            "TABLE_rp": {
                                "ROW_rp": [
                                    {
                                        "TABLE_grange": {
                                            "ROW_grange": {
                                                "grange-grp": "239.128.0.0", 
                                                "grange-is-deny": "false", 
                                                "grange-masklen": "16", 
                                                "is-bidir-grp": "false"
                                            }
                                        }, 
                                        "df-ordinal": "0", 
                                        "is-rp-local": "FALSE", 
                                        "is_autorp_source": "false", 
                                        "is_bsr_source": "false", 
                                        "is_static_source": "true", 
                                        "rp-addr": "7.8.255.7", 
                                        "rp-priority": "255", 
                                        "rp-source": "local", 
                                        "rp-uptime": "1w0d", 
                                        "static-rp-group-map": "PL_multicast_wan_slow"
                                    }, 
                                    {
                                        "TABLE_grange": {
                                            "ROW_grange": [
                                                {
                                                    "grange-grp": "239.0.0.0", 
                                                    "grange-is-deny": "false", 
                                                    "grange-masklen": "16", 
                                                    "is-bidir-grp": "false"
                                                }, 
                                                {
                                                    "grange-grp": "239.255.0.0", 
                                                    "grange-is-deny": "false", 
                                                    "grange-masklen": "16", 
                                                    "is-bidir-grp": "false"
                                                }, 
                                                {
                                                    "grange-grp": "224.0.1.40", 
                                                    "grange-is-deny": "true", 
                                                    "grange-masklen": "32", 
                                                    "is-bidir-grp": "false"
                                                }, 
                                                {
                                                    "grange-grp": "224.0.1.39", 
                                                    "grange-is-deny": "true", 
                                                    "grange-masklen": "32", 
                                                    "is-bidir-grp": "false"
                                                }
                                            ]
                                        }, 
                                        "df-ordinal": "0", 
                                        "is-rp-local": "FALSE", 
                                        "is_autorp_source": "false", 
                                        "is_bsr_source": "false", 
                                        "is_static_source": "true", 
                                        "rp-addr": "7.57.255.1", 
                                        "rp-priority": "255", 
                                        "rp-source": "local", 
                                        "rp-uptime": "1w0d", 
                                        "static-rp-group-map": "acl_rp"
                                    }, 
                                    {
                                        "TABLE_grange": {
                                            "ROW_grange": {
                                                "grange-grp": "239.99.0.0", 
                                                "grange-is-deny": "false", 
                                                "grange-masklen": "16", 
                                                "is-bidir-grp": "false"
                                            }
                                        }, 
                                        "df-ordinal": "0", 
                                        "is-rp-local": "FALSE", 
                                        "is_autorp_source": "false", 
                                        "is_bsr_source": "false", 
                                        "is_static_source": "true", 
                                        "rp-addr": "10.8.255.3", 
                                        "rp-priority": "255", 
                                        "rp-source": "local", 
                                        "rp-uptime": "1w0d", 
                                        "static-rp-group-map": "acl_multicast_wan"
                                    }, 
                                    {
                                        "TABLE_grange": {
                                            "ROW_grange": {
                                                "grange-grp": "239.110.0.0", 
                                                "grange-is-deny": "false", 
                                                "grange-masklen": "16", 
                                                "is-bidir-grp": "true"
                                            }
                                        }, 
                                        "df-ordinal": "2", 
                                        "is-rp-local": "FALSE", 
                                        "is_autorp_source": "false", 
                                        "is_bsr_source": "false", 
                                        "is_static_source": "true", 
                                        "rp-addr": "10.8.255.89", 
                                        "rp-priority": "255", 
                                        "rp-source": "local", 
                                        "rp-uptime": "1w0d", 
                                        "static-rp-group-map": "acl_multicast_pbr_cer"
                                    }, 
                                    {
                                        "TABLE_grange": {
                                            "ROW_grange": [
                                                {
                                                    "grange-grp": "239.100.0.0", 
                                                    "grange-is-deny": "false", 
                                                    "grange-masklen": "16", 
                                                    "is-bidir-grp": "true"
                                                }, 
                                                {
                                                    "grange-grp": "239.111.0.0", 
                                                    "grange-is-deny": "false", 
                                                    "grange-masklen": "16", 
                                                    "is-bidir-grp": "true"
                                                }, 
                                                {
                                                    "grange-grp": "239.108.0.0", 
                                                    "grange-is-deny": "false", 
                                                    "grange-masklen": "16", 
                                                    "is-bidir-grp": "true"
                                                }
                                            ]
                                        }, 
                                        "df-ordinal": "1", 
                                        "is-rp-local": "FALSE", 
                                        "is_autorp_source": "false", 
                                        "is_bsr_source": "false", 
                                        "is_static_source": "true", 
                                        "rp-addr": "10.28.255.4", 
                                        "rp-priority": "255", 
                                        "rp-source": "local", 
                                        "rp-uptime": "1w0d", 
                                        "static-rp-group-map": "acl_multicast_pbr"
                                    }
                                ]
                            }, 
                            "bsr-policy-name": "None", 
                            "is-autorp-enabled": "Auto-RP disabled", 
                            "is-bsr-enabled": "BSR disabled", 
                            "out-context": "default", 
                            "rp-announce-policy-name": "None", 
                            "rp-cand-policy-name": "None", 
                            "rp-discovery-policy-name": "None"
                        }
                    }
                }, 
                "code": "200", 
                "input": "show ip pim rp ", 
                "msg": "Success"
            }
        }, 
        "sid": "eoc", 
        "type": "cli_show", 
        "version": "1.0"
    }
}

The CLI output example below corresponds to the payload example in the code pane on the right. For more information about the show ip pim rp command, see the CLI command reference:

http//www.cisco.com/c/en/us/support/switches/nexus-3000-series-switches/products-command-reference-list.html

CLI Output
Switch# show ip pim rp 
PIM RP Status Information for VRF "default"
BSR disabled
Auto-RP disabled
BSR RP Candidate policy: None
BSR RP policy: None
Auto-RP Announce policy: None
Auto-RP Discovery policy: None

RP: 7.8.255.7, (0), 
 uptime: 1w0d   priority: 255, 
 RP-source: (local), group-map: PL_multicast_wan_slow,
group ranges: 239.128.0.0/16
RP: 7.57.255.1, (0), uptime: 1w0d priority: 255, RP-source: (local), group-map: acl_rp,
group ranges: 239.0.0.0/16
239.255.0.0/16
224.0.1.40/32 (deny)
224.0.1.39/32 (deny)
RP: 10.8.255.3, (0), uptime: 1w0d priority: 255, RP-source: (local), group-map: acl_multicast_wan,
group ranges: 239.99.0.0/16
RP: 10.8.255.89, (2), uptime: 1w0d priority: 255, RP-source: (local), group-map: acl_multicast_pbr_cer,
group ranges: 239.110.0.0/16 (bidir)
RP: 10.28.255.4, (1), uptime: 1w0d priority: 255, RP-source: (local), group-map: acl_multicast_pbr,
group ranges: 239.100.0.0/16 (bidir)
239.111.0.0/16 (bidir)
239.108.0.0/16 (bidir)

show ip route

show ip route

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 ip route ",
  "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": {
        "outputs": {
            "output": {
                "body": {
                    "TABLE_vrf": {
                        "ROW_vrf": {
                            "TABLE_addrf": {
                                "ROW_addrf": {
                                    "TABLE_prefix": {
                                        "ROW_prefix": [
                                            {
                                                "TABLE_path": {
                                                    "ROW_path": {
                                                        "clientname": "static", 
                                                        "ifname": "Null0", 
                                                        "metric": 0, 
                                                        "pref": 1, 
                                                        "ubest": "true", 
                                                        "uptime": "P7DT12H2M5S"
                                                    }
                                                }, 
                                                "attached": "false", 
                                                "ipprefix": "7.57.0.0/16", 
                                                "mcast-nhops": 0, 
                                                "ucast-nhops": 1
                                            }, 
                                            {
                                                "TABLE_path": {
                                                    "ROW_path": {
                                                        "clientname": "direct", 
                                                        "ifname": "Vlan253", 
                                                        "ipnexthop": "7.57.253.2", 
                                                        "metric": 0, 
                                                        "pref": 0, 
                                                        "ubest": "true", 
                                                        "uptime": "P7DT12H34S"
                                                    }
                                                }, 
                                                "attached": "true", 
                                                "ipprefix": "7.57.253.0/30", 
                                                "mcast-nhops": 0, 
                                                "ucast-nhops": 1
                                            }, 
                                            {
                                                "TABLE_path": {
                                                    "ROW_path": {
                                                        "clientname": "local", 
                                                        "ifname": "Vlan253", 
                                                        "ipnexthop": "7.57.253.2", 
                                                        "metric": 0, 
                                                        "pref": 0, 
                                                        "ubest": "true", 
                                                        "uptime": "P7DT12H34S"
                                                    }
                                                }, 
                                                "attached": "true", 
                                                "ipprefix": "7.57.253.2/32", 
                                                "mcast-nhops": 0, 
                                                "ucast-nhops": 1
                                            }, 
                                            {
                                                "TABLE_path": {
                                                    "ROW_path": [
                                                        {
                                                            "clientname": "bgp-65057", 
                                                            "ipnexthop": "10.100.157.1", 
                                                            "metric": 0, 
                                                            "pref": 20, 
                                                            "tag": 65059, 
                                                            "type": "external", 
                                                            "ubest": "true", 
                                                            "uptime": "P7DT11H58M55S"
                                                        }, 
                                                        {
                                                            "clientname": "bgp-65057", 
                                                            "ipnexthop": "10.100.157.9", 
                                                            "metric": 0, 
                                                            "pref": 20, 
                                                            "tag": 65059, 
                                                            "type": "external", 
                                                            "ubest": "true", 
                                                            "uptime": "P7DT11H58M55S"
                                                        }
                                                    ]
                                                }, 
                                                "attached": "false", 
                                                "ipprefix": "7.57.255.1/32", 
                                                "mcast-nhops": 0, 
                                                "ucast-nhops": 2
                                            }, 
                                            {
                                                "TABLE_path": {
                                                    "ROW_path": [
                                                        {
                                                            "clientname": "local", 
                                                            "ifname": "Lo0", 
                                                            "ipnexthop": "7.57.255.2", 
                                                            "metric": 0, 
                                                            "pref": 0, 
                                                            "ubest": "true", 
                                                            "uptime": "P7DT12H2M2S"
                                                        }, 
                                                        {
                                                            "clientname": "direct", 
                                                            "ifname": "Lo0", 
                                                            "ipnexthop": "7.57.255.2", 
                                                            "metric": 0, 
                                                            "pref": 0, 
                                                            "ubest": "true", 
                                                            "uptime": "P7DT12H2M2S"
                                                        }
                                                    ]
                                                }, 
                                                "attached": "true", 
                                                "ipprefix": "7.57.255.2/32", 
                                                "mcast-nhops": 0, 
                                                "ucast-nhops": 2
                                            }, 
                                            {
                                                "TABLE_path": {
                                                    "ROW_path": {
                                                        "clientname": "ospf-1", 
                                                        "ifname": "Vlan253", 
                                                        "ipnexthop": "7.57.253.1", 
                                                        "metric": 42, 
                                                        "pref": 110, 
                                                        "type": "intra", 
                                                        "ubest": "true", 
                                                        "uptime": "P7DT12H22S"
                                                    }
                                                }, 
                                                "attached": "false", 
                                                "ipprefix": "8.8.8.0/24", 
                                                "mcast-nhops": 0, 
                                                "ucast-nhops": 1
                                            }, 
                                            {
                                                "TABLE_path": {
                                                    "ROW_path": {
                                                        "clientname": "ospf-1", 
                                                        "ifname": "Vlan253", 
                                                        "ipnexthop": "7.57.253.1", 
                                                        "metric": 42, 
                                                        "pref": 110, 
                                                        "type": "intra", 
                                                        "ubest": "true", 
                                                        "uptime": "P7DT12H22S"
                                                    }
                                                }, 
                                                "attached": "false", 
                                                "ipprefix": "9.9.9.0/24", 
                                                "mcast-nhops": 0, 
                                                "ucast-nhops": 1
                                            }, 
                                            {
                                                "TABLE_path": {
                                                    "ROW_path": {
                                                        "clientname": "static", 
                                                        "ifname": "Null0", 
                                                        "metric": 0, 
                                                        "pref": 1, 
                                                        "ubest": "true", 
                                                        "uptime": "P7DT12H2M5S"
                                                    }
                                                }, 
                                                "attached": "false", 
                                                "ipprefix": "10.0.0.0/8", 
                                                "mcast-nhops": 0, 
                                                "ucast-nhops": 1
                                            }, 
                                            {
                                                "TABLE_path": {
                                                    "ROW_path": {
                                                        "clientname": "static", 
                                                        "ifname": "Null0", 
                                                        "metric": 0, 
                                                        "pref": 1, 
                                                        "ubest": "true", 
                                                        "uptime": "P7DT12H2M5S"
                                                    }
                                                }, 
                                                "attached": "false", 
                                                "ipprefix": "10.57.0.0/16", 
                                                "mcast-nhops": 0, 
                                                "ucast-nhops": 1
                                            }, 
                                            {
                                                "TABLE_path": {
                                                    "ROW_path": {
                                                        "clientname": "direct", 
                                                        "ifname": "Vlan8", 
                                                        "ipnexthop": "10.57.8.3", 
                                                        "metric": 0, 
                                                        "pref": 0, 
                                                        "ubest": "true", 
                                                        "uptime": "P7DT12H44S"
                                                    }
                                                }, 
                                                "attached": "true", 
                                                "ipprefix": "10.57.8.0/22", 
                                                "mcast-nhops": 0, 
                                                "ucast-nhops": 1
                                            }, 
                                            {
                                                "TABLE_path": {
                                                    "ROW_path": {
                                                        "clientname": "local", 
                                                        "ifname": "Vlan8", 
                                                        "ipnexthop": "10.57.8.3", 
                                                        "metric": 0, 
                                                        "pref": 0, 
                                                        "ubest": "true", 
                                                        "uptime": "P7DT12H44S"
                                                    }
                                                }, 
                                                "attached": "true", 
                                                "ipprefix": "10.57.8.3/32", 
                                                "mcast-nhops": 0, 
                                                "ucast-nhops": 1
                                            }, 
                                            {
                                                "TABLE_path": {
                                                    "ROW_path": {
                                                        "clientname": "direct", 
                                                        "ifname": "Vlan50", 
                                                        "ipnexthop": "10.57.50.4", 
                                                        "metric": 0, 
                                                        "pref": 0, 
                                                        "ubest": "true", 
                                                        "uptime": "P7DT12H34S"
                                                    }
                                                }, 
                                                "attached": "true", 
                                                "ipprefix": "10.57.50.0/24", 
                                                "mcast-nhops": 0, 
                                                "ucast-nhops": 1
                                            }, 
                                            {
                                                "TABLE_path": {
                                                    "ROW_path": {
                                                        "clientname": "local", 
                                                        "ifname": "Vlan50", 
                                                        "ipnexthop": "10.57.50.4", 
                                                        "metric": 0, 
                                                        "pref": 0, 
                                                        "ubest": "true", 
                                                        "uptime": "P7DT12H34S"
                                                    }
                                                }, 
                                                "attached": "true", 
                                                "ipprefix": "10.57.50.4/32", 
                                                "mcast-nhops": 0, 
                                                "ucast-nhops": 1
                                            }, 
                                            {
                                                "TABLE_path": {
                                                    "ROW_path": {
                                                        "clientname": "direct", 
                                                        "ifname": "Eth1/1", 
                                                        "ipnexthop": "10.100.90.129", 
                                                        "metric": 0, 
                                                        "pref": 0, 
                                                        "ubest": "true", 
                                                        "uptime": "P6DT12H2M16S"
                                                    }
                                                }, 
                                                "attached": "true", 
                                                "ipprefix": "10.100.90.128/30", 
                                                "mcast-nhops": 0, 
                                                "ucast-nhops": 1
                                            }, 
                                            {
                                                "TABLE_path": {
                                                    "ROW_path": {
                                                        "clientname": "local", 
                                                        "ifname": "Eth1/1", 
                                                        "ipnexthop": "10.100.90.129", 
                                                        "metric": 0, 
                                                        "pref": 0, 
                                                        "ubest": "true", 
                                                        "uptime": "P6DT12H2M16S"
                                                    }
                                                }, 
                                                "attached": "true", 
                                                "ipprefix": "10.100.90.129/32", 
                                                "mcast-nhops": 0, 
                                                "ucast-nhops": 1
                                            }, 
                                            {
                                                "TABLE_path": {
                                                    "ROW_path": {
                                                        "clientname": "direct", 
                                                        "ifname": "Eth1/2", 
                                                        "ipnexthop": "10.100.157.2", 
                                                        "metric": 0, 
                                                        "pref": 0, 
                                                        "ubest": "true", 
                                                        "uptime": "P7DT12H48S"
                                                    }
                                                }, 
                                                "attached": "true", 
                                                "ipprefix": "10.100.157.0/30", 
                                                "mcast-nhops": 0, 
                                                "ucast-nhops": 1
                                            }, 
                                            {
                                                "TABLE_path": {
                                                    "ROW_path": {
                                                        "clientname": "local", 
                                                        "ifname": "Eth1/2", 
                                                        "ipnexthop": "10.100.157.2", 
                                                        "metric": 0, 
                                                        "pref": 0, 
                                                        "ubest": "true", 
                                                        "uptime": "P7DT12H48S"
                                                    }
                                                }, 
                                                "attached": "true", 
                                                "ipprefix": "10.100.157.2/32", 
                                                "mcast-nhops": 0, 
                                                "ucast-nhops": 1
                                            }, 
                                            {
                                                "TABLE_path": {
                                                    "ROW_path": {
                                                        "clientname": "direct", 
                                                        "ifname": "Eth1/4", 
                                                        "ipnexthop": "10.100.157.10", 
                                                        "metric": 0, 
                                                        "pref": 0, 
                                                        "ubest": "true", 
                                                        "uptime": "P7DT12H48S"
                                                    }
                                                }, 
                                                "attached": "true", 
                                                "ipprefix": "10.100.157.8/30", 
                                                "mcast-nhops": 0, 
                                                "ucast-nhops": 1
                                            }, 
                                            {
                                                "TABLE_path": {
                                                    "ROW_path": {
                                                        "clientname": "local", 
                                                        "ifname": "Eth1/4", 
                                                        "ipnexthop": "10.100.157.10", 
                                                        "metric": 0, 
                                                        "pref": 0, 
                                                        "ubest": "true", 
                                                        "uptime": "P7DT12H48S"
                                                    }
                                                }, 
                                                "attached": "true", 
                                                "ipprefix": "10.100.157.10/32", 
                                                "mcast-nhops": 0, 
                                                "ucast-nhops": 1
                                            }, 
                                            {
                                                "TABLE_path": {
                                                    "ROW_path": {
                                                        "clientname": "static", 
                                                        "ifname": "Eth1/5", 
                                                        "ipnexthop": "94.1.1.10", 
                                                        "metric": 0, 
                                                        "pref": 1, 
                                                        "ubest": "true", 
                                                        "uptime": "P7DT12H1M37S"
                                                    }
                                                }, 
                                                "attached": "false", 
                                                "ipprefix": "17.0.1.1/32", 
                                                "mcast-nhops": 0, 
                                                "ucast-nhops": 1
                                            }, 
                                            {
                                                "TABLE_path": {
                                                    "ROW_path": {
                                                        "clientname": "static", 
                                                        "ifname": "Eth1/5", 
                                                        "ipnexthop": "94.1.1.10", 
                                                        "metric": 0, 
                                                        "pref": 1, 
                                                        "ubest": "true", 
                                                        "uptime": "P7DT12H1M37S"
                                                    }
                                                }, 
                                                "attached": "false", 
                                                "ipprefix": "17.0.1.2/32", 
                                                "mcast-nhops": 0, 
                                                "ucast-nhops": 1
                                            }, 
                                            {
                                                "TABLE_path": {
                                                    "ROW_path": {
                                                        "clientname": "static", 
                                                        "ifname": "Eth1/5", 
                                                        "ipnexthop": "94.1.1.10", 
                                                        "metric": 0, 
                                                        "pref": 1, 
                                                        "ubest": "true", 
                                                        "uptime": "P7DT12H1M37S"
                                                    }
                                                }, 
                                                "attached": "false", 
                                                "ipprefix": "17.0.1.3/32", 
                                                "mcast-nhops": 0, 
                                                "ucast-nhops": 1
                                            }, 
                                            {
                                                "TABLE_path": {
                                                    "ROW_path": [
                                                        {
                                                            "clientname": "bgp-65057", 
                                                            "ipnexthop": "10.100.157.1", 
                                                            "metric": 0, 
                                                            "pref": 20, 
                                                            "tag": 65059, 
                                                            "type": "external", 
                                                            "ubest": "true", 
                                                            "uptime": "P7DT11H58M55S"
                                                        }, 
                                                        {
                                                            "clientname": "bgp-65057", 
                                                            "ipnexthop": "10.100.157.9", 
                                                            "metric": 0, 
                                                            "pref": 20, 
                                                            "tag": 65059, 
                                                            "type": "external", 
                                                            "ubest": "true", 
                                                            "uptime": "P7DT11H58M55S"
                                                        }
                                                    ]
                                                }, 
                                                "attached": "false", 
                                                "ipprefix": "33.33.33.33/32", 
                                                "mcast-nhops": 0, 
                                                "ucast-nhops": 2
                                            }, 
                                            {
                                                "TABLE_path": {
                                                    "ROW_path": {
                                                        "clientname": "direct", 
                                                        "ifname": "Eth1/1.50", 
                                                        "ipnexthop": "89.1.1.1", 
                                                        "metric": 0, 
                                                        "pref": 0, 
                                                        "ubest": "true", 
                                                        "uptime": "P6DT12H2M16S"
                                                    }
                                                }, 
                                                "attached": "true", 
                                                "ipprefix": "89.1.1.0/24", 
                                                "mcast-nhops": 0, 
                                                "ucast-nhops": 1
                                            }, 
                                            {
                                                "TABLE_path": {
                                                    "ROW_path": {
                                                        "clientname": "local", 
                                                        "ifname": "Eth1/1.50", 
                                                        "ipnexthop": "89.1.1.1", 
                                                        "metric": 0, 
                                                        "pref": 0, 
                                                        "ubest": "true", 
                                                        "uptime": "P6DT12H2M16S"
                                                    }
                                                }, 
                                                "attached": "true", 
                                                "ipprefix": "89.1.1.1/32", 
                                                "mcast-nhops": 0, 
                                                "ucast-nhops": 1
                                            }, 
                                            {
                                                "TABLE_path": {
                                                    "ROW_path": {
                                                        "clientname": "direct", 
                                                        "ifname": "Eth1/1.51", 
                                                        "ipnexthop": "89.1.2.1", 
                                                        "metric": 0, 
                                                        "pref": 0, 
                                                        "ubest": "true", 
                                                        "uptime": "P6DT12H2M16S"
                                                    }
                                                }, 
                                                "attached": "true", 
                                                "ipprefix": "89.1.2.0/24", 
                                                "mcast-nhops": 0, 
                                                "ucast-nhops": 1
                                            }, 
                                            {
                                                "TABLE_path": {
                                                    "ROW_path": {
                                                        "clientname": "local", 
                                                        "ifname": "Eth1/1.51", 
                                                        "ipnexthop": "89.1.2.1", 
                                                        "metric": 0, 
                                                        "pref": 0, 
                                                        "ubest": "true", 
                                                        "uptime": "P6DT12H2M16S"
                                                    }
                                                }, 
                                                "attached": "true", 
                                                "ipprefix": "89.1.2.1/32", 
                                                "mcast-nhops": 0, 
                                                "ucast-nhops": 1
                                            }, 
                                            {
                                                "TABLE_path": {
                                                    "ROW_path": {
                                                        "clientname": "direct", 
                                                        "ifname": "Eth1/1.52", 
                                                        "ipnexthop": "89.1.3.1", 
                                                        "metric": 0, 
                                                        "pref": 0, 
                                                        "ubest": "true", 
                                                        "uptime": "P6DT12H2M16S"
                                                    }
                                                }, 
                                                "attached": "true", 
                                                "ipprefix": "89.1.3.0/24", 
                                                "mcast-nhops": 0, 
                                                "ucast-nhops": 1
                                            }, 
                                            {
                                                "TABLE_path": {
                                                    "ROW_path": {
                                                        "clientname": "local", 
                                                        "ifname": "Eth1/1.52", 
                                                        "ipnexthop": "89.1.3.1", 
                                                        "metric": 0, 
                                                        "pref": 0, 
                                                        "ubest": "true", 
                                                        "uptime": "P6DT12H2M16S"
                                                    }
                                                }, 
                                                "attached": "true", 
                                                "ipprefix": "89.1.3.1/32", 
                                                "mcast-nhops": 0, 
                                                "ucast-nhops": 1
                                            }, 
                                            {
                                                "TABLE_path": {
                                                    "ROW_path": {
                                                        "clientname": "direct", 
                                                        "ifname": "Eth1/1.53", 
                                                        "ipnexthop": "89.1.4.1", 
                                                        "metric": 0, 
                                                        "pref": 0, 
                                                        "ubest": "true", 
                                                        "uptime": "P6DT12H2M16S"
                                                    }
                                                }, 
                                                "attached": "true", 
                                                "ipprefix": "89.1.4.0/24", 
                                                "mcast-nhops": 0, 
                                                "ucast-nhops": 1
                                            }, 
                                            {
                                                "TABLE_path": {
                                                    "ROW_path": {
                                                        "clientname": "local", 
                                                        "ifname": "Eth1/1.53", 
                                                        "ipnexthop": "89.1.4.1", 
                                                        "metric": 0, 
                                                        "pref": 0, 
                                                        "ubest": "true", 
                                                        "uptime": "P6DT12H2M16S"
                                                    }
                                                }, 
                                                "attached": "true", 
                                                "ipprefix": "89.1.4.1/32", 
                                                "mcast-nhops": 0, 
                                                "ucast-nhops": 1
                                            }, 
                                            {
                                                "TABLE_path": {
                                                    "ROW_path": {
                                                        "clientname": "direct", 
                                                        "ifname": "Eth1/5", 
                                                        "ipnexthop": "94.1.1.96", 
                                                        "metric": 0, 
                                                        "pref": 0, 
                                                        "ubest": "true", 
                                                        "uptime": "P7DT12H1M37S"
                                                    }
                                                }, 
                                                "attached": "true", 
                                                "ipprefix": "94.1.1.0/24", 
                                                "mcast-nhops": 0, 
                                                "ucast-nhops": 1
                                            }, 
                                            {
                                                "TABLE_path": {
                                                    "ROW_path": {
                                                        "clientname": "local", 
                                                        "ifname": "Eth1/5", 
                                                        "ipnexthop": "94.1.1.96", 
                                                        "metric": 0, 
                                                        "pref": 0, 
                                                        "ubest": "true", 
                                                        "uptime": "P7DT12H1M37S"
                                                    }
                                                }, 
                                                "attached": "true", 
                                                "ipprefix": "94.1.1.96/32", 
                                                "mcast-nhops": 0, 
                                                "ucast-nhops": 1
                                            }, 
                                            {
                                                "TABLE_path": {
                                                    "ROW_path": {
                                                        "clientname": "direct", 
                                                        "ifname": "Eth1/7", 
                                                        "ipnexthop": "192.168.161.2", 
                                                        "metric": 0, 
                                                        "pref": 0, 
                                                        "ubest": "true", 
                                                        "uptime": "P7DT12H45S"
                                                    }
                                                }, 
                                                "attached": "true", 
                                                "ipprefix": "192.168.161.0/24", 
                                                "mcast-nhops": 0, 
                                                "ucast-nhops": 1
                                            }, 
                                            {
                                                "TABLE_path": {
                                                    "ROW_path": {
                                                        "clientname": "local", 
                                                        "ifname": "Eth1/7", 
                                                        "ipnexthop": "192.168.161.2", 
                                                        "metric": 0, 
                                                        "pref": 0, 
                                                        "ubest": "true", 
                                                        "uptime": "P7DT12H45S"
                                                    }
                                                }, 
                                                "attached": "true", 
                                                "ipprefix": "192.168.161.2/32", 
                                                "mcast-nhops": 0, 
                                                "ucast-nhops": 1
                                            }
                                        ]
                                    }, 
                                    "addrf": "ipv4"
                                }
                            }, 
                            "vrf-name-out": "default"
                        }
                    }
                }, 
                "code": "200", 
                "input": "show ip route ", 
                "msg": "Success"
            }
        }, 
        "sid": "eoc", 
        "type": "cli_show", 
        "version": "1.0"
    }
}

The CLI output example below corresponds to the payload example in the code pane on the right. For more information about the show ip route command, see the CLI command reference:

http//www.cisco.com/c/en/us/support/switches/nexus-3000-series-switches/products-command-reference-list.html

CLI Output
Switch# show ip route 
IP Route Table for VRF "default"
'' denotes best ucast next-hop
'**' denotes best mcast next-hop
'[x/y]' denotes [preference/metric]
'% string ' in via output denotes VRF  string 

7.57.0.0/16, ubest/mbest: 1/0
    via Null0, [1/0], 1w0d, static
7.57.253.0/30, ubest/mbest: 1/0, attached
    via 7.57.253.2, Vlan253, [0/0], 1w0d, direct
7.57.253.2/32, ubest/mbest: 1/0, attached
    via 7.57.253.2, Vlan253, [0/0], 1w0d, local
7.57.255.1/32, ubest/mbest: 2/0
    via 10.100.157.1, [20/0], 1w0d, bgp-65057, external, tag 65059 (backup)
    via 10.100.157.9, [20/0], 1w0d, bgp-65057, external, tag 65059
7.57.255.2/32, ubest/mbest: 2/0, attached
    via 7.57.255.2, Lo0, [0/0], 1w0d, local
    via 7.57.255.2, Lo0, [0/0], 1w0d, direct
8.8.8.0/24, ubest/mbest: 1/0
    via 7.57.253.1, Vlan253, [110/42], 1w0d, ospf-1, intra
9.9.9.0/24, ubest/mbest: 1/0
    via 7.57.253.1, Vlan253, [110/42], 1w0d, ospf-1, intra
10.0.0.0/8, ubest/mbest: 1/0
    via Null0, [1/0], 1w0d, static
10.57.0.0/16, ubest/mbest: 1/0
    via Null0, [1/0], 1w0d, static
10.57.8.0/22, ubest/mbest: 1/0, attached
    via 10.57.8.3, Vlan8, [0/0], 1w0d, direct
10.57.8.3/32, ubest/mbest: 1/0, attached
    via 10.57.8.3, Vlan8, [0/0], 1w0d, local
10.57.50.0/24, ubest/mbest: 1/0, attached
    via 10.57.50.4, Vlan50, [0/0], 1w0d, direct
10.57.50.4/32, ubest/mbest: 1/0, attached
    via 10.57.50.4, Vlan50, [0/0], 1w0d, local
10.100.90.128/30, ubest/mbest: 1/0, attached
    via 10.100.90.129, Eth1/1, [0/0], 6d12h, direct
10.100.90.129/32, ubest/mbest: 1/0, attached
    via 10.100.90.129, Eth1/1, [0/0], 6d12h, local
10.100.157.0/30, ubest/mbest: 1/0, attached
    via 10.100.157.2, Eth1/2, [0/0], 1w0d, direct
10.100.157.2/32, ubest/mbest: 1/0, attached
    via 10.100.157.2, Eth1/2, [0/0], 1w0d, local
10.100.157.8/30, ubest/mbest: 1/0, attached
    via 10.100.157.10, Eth1/4, [0/0], 1w0d, direct
10.100.157.10/32, ubest/mbest: 1/0, attached
    via 10.100.157.10, Eth1/4, [0/0], 1w0d, local
17.0.1.1/32, ubest/mbest: 1/0
    via 94.1.1.10, Eth1/5, [1/0], 1w0d, static
17.0.1.2/32, ubest/mbest: 1/0
    via 94.1.1.10, Eth1/5, [1/0], 1w0d, static
17.0.1.3/32, ubest/mbest: 1/0
    via 94.1.1.10, Eth1/5, [1/0], 1w0d, static
33.33.33.33/32, ubest/mbest: 2/0
    via 10.100.157.1, [20/0], 1w0d, bgp-65057, external, tag 65059 (backup)
    via 10.100.157.9, [20/0], 1w0d, bgp-65057, external, tag 65059
89.1.1.0/24, ubest/mbest: 1/0, attached
    via 89.1.1.1, Eth1/1.50, [0/0], 6d12h, direct
89.1.1.1/32, ubest/mbest: 1/0, attached
    via 89.1.1.1, Eth1/1.50, [0/0], 6d12h, local
89.1.2.0/24, ubest/mbest: 1/0, attached
    via 89.1.2.1, Eth1/1.51, [0/0], 6d12h, direct
89.1.2.1/32, ubest/mbest: 1/0, attached
    via 89.1.2.1, Eth1/1.51, [0/0], 6d12h, local
89.1.3.0/24, ubest/mbest: 1/0, attached
    via 89.1.3.1, Eth1/1.52, [0/0], 6d12h, direct
89.1.3.1/32, ubest/mbest: 1/0, attached
    via 89.1.3.1, Eth1/1.52, [0/0], 6d12h, local
89.1.4.0/24, ubest/mbest: 1/0, attached
    via 89.1.4.1, Eth1/1.53, [0/0], 6d12h, direct
89.1.4.1/32, ubest/mbest: 1/0, attached
    via 89.1.4.1, Eth1/1.53, [0/0], 6d12h, local
94.1.1.0/24, ubest/mbest: 1/0, attached
    via 94.1.1.96, Eth1/5, [0/0], 1w0d, direct
94.1.1.96/32, ubest/mbest: 1/0, attached
    via 94.1.1.96, Eth1/5, [0/0], 1w0d, local
192.168.161.0/24, ubest/mbest: 1/0, attached
    via 192.168.161.2, Eth1/7, [0/0], 1w0d, direct
192.168.161.2/32, ubest/mbest: 1/0, attached
    *via 192.168.161.2, Eth1/7, [0/0], 1w0d, local


show ip route 3.1.1.0

show ip route 3.1.1.0

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 ip route 3.1.1.0 ",
  "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": {
        "outputs": {
            "output": {
                "body": {
                    "TABLE_vrf": {
                        "ROW_vrf": {
                            "TABLE_addrf": {
                                "ROW_addrf": {
                                    "addrf": "ipv4"
                                }
                            }, 
                            "vrf-name-out": "default"
                        }
                    }
                }, 
                "code": "200", 
                "input": "show ip route 3.1.1.0 ", 
                "msg": "Success"
            }
        }, 
        "sid": "eoc", 
        "type": "cli_show", 
        "version": "1.0"
    }
}

The CLI output example below corresponds to the payload example in the code pane on the right. For more information about the show ip route 3.1.1.0 command, see the CLI command reference:

http//www.cisco.com/c/en/us/support/switches/nexus-3000-series-switches/products-command-reference-list.html

CLI Output
Switch# show ip route 3.1.1.0 
IP Route Table for VRF "default"
'' denotes best ucast next-hop
'*' denotes best mcast next-hop
'[x/y]' denotes [preference/metric]
'% string ' in via output denotes VRF  string 

Route not found

show ip route 3.1.1.0 vrf red

show ip route 3.1.1.0 vrf red

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 ip route 3.1.1.0 vrf red ",
  "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": {
        "outputs": {
            "output": {
                "body": "", 
                "code": "200", 
                "input": "show ip route 3.1.1.0 vrf red ", 
                "msg": "Success"
            }
        }, 
        "sid": "eoc", 
        "type": "cli_show", 
        "version": "1.0"
    }
}

The CLI output example below corresponds to the payload example in the code pane on the right. For more information about the show ip route 3.1.1.0 vrf red command, see the CLI command reference:

http//www.cisco.com/c/en/us/support/switches/nexus-3000-series-switches/products-command-reference-list.html

CLI Output
Switch# show ip route 3.1.1.0 vrf red 
No IP Route Table for VRF "red"

show ip route summary

show ip route 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 ip route 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": {
        "outputs": {
            "output": {
                "body": {
                    "TABLE_vrf": {
                        "ROW_vrf": {
                            "TABLE_addrf": {
                                "ROW_addrf": {
                                    "TABLE_summary": {
                                        "ROW_summary": {
                                            "TABLE_route_count": {
                                                "ROW_route_count": [
                                                    {
                                                        "count": 2, 
                                                        "mask_len": 8
                                                    }, 
                                                    {
                                                        "count": 2, 
                                                        "mask_len": 16
                                                    }, 
                                                    {
                                                        "count": 1, 
                                                        "mask_len": 22
                                                    }, 
                                                    {
                                                        "count": 9, 
                                                        "mask_len": 24
                                                    }, 
                                                    {
                                                        "count": 4, 
                                                        "mask_len": 30
                                                    }, 
                                                    {
                                                        "count": 49, 
                                                        "mask_len": 32
                                                    }
                                                ]
                                            }, 
                                            "TABLE_unicast": {
                                                "ROW_unicast": [
                                                    {
                                                        "best-paths": 5, 
                                                        "clientnameuni": "am"
                                                    }, 
                                                    {
                                                        "backup-paths": 7, 
                                                        "clientnameuni": "bgp-65057"
                                                    }, 
                                                    {
                                                        "best-paths": 13, 
                                                        "clientnameuni": "local"
                                                    }, 
                                                    {
                                                        "backup-paths": 2, 
                                                        "clientnameuni": "ospf-1"
                                                    }, 
                                                    {
                                                        "best-paths": 13, 
                                                        "clientnameuni": "direct"
                                                    }, 
                                                    {
                                                        "backup-paths": 2, 
                                                        "clientnameuni": "ospf-100"
                                                    }, 
                                                    {
                                                        "best-paths": 6, 
                                                        "clientnameuni": "static"
                                                    }, 
                                                    {
                                                        "best-paths": 27, 
                                                        "clientnameuni": "broadcast"
                                                    }, 
                                                    {
                                                        "best-paths": 4, 
                                                        "clientnameuni": "bgp-65057"
                                                    }, 
                                                    {
                                                        "best-paths": 2, 
                                                        "clientnameuni": "ospf-1"
                                                    }
                                                ]
                                            }, 
                                            "paths": 81, 
                                            "routes": 67
                                        }
                                    }, 
                                    "addrf": "ipv4"
                                }
                            }, 
                            "vrf-name-out": "default"
                        }
                    }
                }, 
                "code": "200", 
                "input": "show ip route summary ", 
                "msg": "Success"
            }
        }, 
        "sid": "eoc", 
        "type": "cli_show", 
        "version": "1.0"
    }
}

The CLI output example below corresponds to the payload example in the code pane on the right. For more information about the show ip route summary command, see the CLI command reference:

http//www.cisco.com/c/en/us/support/switches/nexus-3000-series-switches/products-command-reference-list.html

CLI Output
Switch# show ip route summary 
IP Route Table for VRF "default"
Total number of routes: 67
Total number of paths:  81

Best paths per protocol:      Backup paths per protocol:
  am             : 5            bgp-65057      : 7
  local          : 13           ospf-1         : 2
  direct         : 13           ospf-100       : 2
  static         : 6
broadcast : 27
bgp-65057 : 4
ospf-1 : 2
Number of routes per mask-length: /8 : 2 /16: 2 /22: 1 /24: 9 /30: 4
/32: 49

show ip route summary vrf all

show ip route summary vrf 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 ip route summary vrf 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": {
        "outputs": {
            "output": {
                "body": {
                    "TABLE_vrf": {
                        "ROW_vrf": [
                            {
                                "TABLE_addrf": {
                                    "ROW_addrf": {
                                        "TABLE_summary": {
                                            "ROW_summary": {
                                                "TABLE_route_count": {
                                                    "ROW_route_count": [
                                                        {
                                                            "count": 2, 
                                                            "mask_len": 8
                                                        }, 
                                                        {
                                                            "count": 2, 
                                                            "mask_len": 16
                                                        }, 
                                                        {
                                                            "count": 1, 
                                                            "mask_len": 22
                                                        }, 
                                                        {
                                                            "count": 9, 
                                                            "mask_len": 24
                                                        }, 
                                                        {
                                                            "count": 4, 
                                                            "mask_len": 30
                                                        }, 
                                                        {
                                                            "count": 49, 
                                                            "mask_len": 32
                                                        }
                                                    ]
                                                }, 
                                                "TABLE_unicast": {
                                                    "ROW_unicast": [
                                                        {
                                                            "best-paths": 5, 
                                                            "clientnameuni": "am"
                                                        }, 
                                                        {
                                                            "backup-paths": 7, 
                                                            "clientnameuni": "bgp-65057"
                                                        }, 
                                                        {
                                                            "best-paths": 13, 
                                                            "clientnameuni": "local"
                                                        }, 
                                                        {
                                                            "backup-paths": 2, 
                                                            "clientnameuni": "ospf-1"
                                                        }, 
                                                        {
                                                            "best-paths": 13, 
                                                            "clientnameuni": "direct"
                                                        }, 
                                                        {
                                                            "backup-paths": 2, 
                                                            "clientnameuni": "ospf-100"
                                                        }, 
                                                        {
                                                            "best-paths": 6, 
                                                            "clientnameuni": "static"
                                                        }, 
                                                        {
                                                            "best-paths": 27, 
                                                            "clientnameuni": "broadcast"
                                                        }, 
                                                        {
                                                            "best-paths": 4, 
                                                            "clientnameuni": "bgp-65057"
                                                        }, 
                                                        {
                                                            "best-paths": 2, 
                                                            "clientnameuni": "ospf-1"
                                                        }
                                                    ]
                                                }, 
                                                "paths": 81, 
                                                "routes": 67
                                            }
                                        }, 
                                        "addrf": "ipv4"
                                    }
                                }, 
                                "vrf-name-out": "default"
                            }, 
                            {
                                "TABLE_addrf": {
                                    "ROW_addrf": {
                                        "TABLE_summary": {
                                            "ROW_summary": {
                                                "TABLE_route_count": {
                                                    "ROW_route_count": [
                                                        {
                                                            "count": 1, 
                                                            "mask_len": 0
                                                        }, 
                                                        {
                                                            "count": 1, 
                                                            "mask_len": 8
                                                        }, 
                                                        {
                                                            "count": 1, 
                                                            "mask_len": 24
                                                        }, 
                                                        {
                                                            "count": 7, 
                                                            "mask_len": 32
                                                        }
                                                    ]
                                                }, 
                                                "TABLE_unicast": {
                                                    "ROW_unicast": [
                                                        {
                                                            "best-paths": 2, 
                                                            "clientnameuni": "am"
                                                        }, 
                                                        {
                                                            "best-paths": 1, 
                                                            "clientnameuni": "local"
                                                        }, 
                                                        {
                                                            "best-paths": 1, 
                                                            "clientnameuni": "direct"
                                                        }, 
                                                        {
                                                            "best-paths": 1, 
                                                            "clientnameuni": "static"
                                                        }, 
                                                        {
                                                            "best-paths": 5, 
                                                            "clientnameuni": "broadcast"
                                                        }
                                                    ]
                                                }, 
                                                "paths": 10, 
                                                "routes": 10
                                            }
                                        }, 
                                        "addrf": "ipv4"
                                    }
                                }, 
                                "vrf-name-out": "management"
                            }, 
                            {
                                "TABLE_addrf": {
                                    "ROW_addrf": {
                                        "TABLE_summary": {
                                            "ROW_summary": {
                                                "TABLE_route_count": {
                                                    "ROW_route_count": [
                                                        {
                                                            "count": 1, 
                                                            "mask_len": 8
                                                        }, 
                                                        {
                                                            "count": 2, 
                                                            "mask_len": 30
                                                        }, 
                                                        {
                                                            "count": 10, 
                                                            "mask_len": 32
                                                        }
                                                    ]
                                                }, 
                                                "TABLE_unicast": {
                                                    "ROW_unicast": [
                                                        {
                                                            "best-paths": 2, 
                                                            "clientnameuni": "am"
                                                        }, 
                                                        {
                                                            "best-paths": 2, 
                                                            "clientnameuni": "local"
                                                        }, 
                                                        {
                                                            "best-paths": 2, 
                                                            "clientnameuni": "direct"
                                                        }, 
                                                        {
                                                            "best-paths": 7, 
                                                            "clientnameuni": "broadcast"
                                                        }
                                                    ]
                                                }, 
                                                "paths": 13, 
                                                "routes": 13
                                            }
                                        }, 
                                        "addrf": "ipv4"
                                    }
                                }, 
                                "vrf-name-out": "test"
                            }
                        ]
                    }
                }, 
                "code": "200", 
                "input": "show ip route summary vrf all ", 
                "msg": "Success"
            }
        }, 
        "sid": "eoc", 
        "type": "cli_show", 
        "version": "1.0"
    }
}

The CLI output example below corresponds to the payload example in the code pane on the right. For more information about the show ip route summary vrf all command, see the CLI command reference:

http//www.cisco.com/c/en/us/support/switches/nexus-3000-series-switches/products-command-reference-list.html

CLI Output
Switch# show ip route summary vrf all 
IP Route Table for VRF "default"
Total number of routes: 67
Total number of paths:  81

Best paths per protocol:      Backup paths per protocol:
  am             : 5            bgp-65057      : 7
  local          : 13           ospf-1         : 2
  direct         : 13           ospf-100       : 2
  static         : 6
broadcast : 27
bgp-65057 : 4
ospf-1 : 2
Number of routes per mask-length: /8 : 2 /16: 2 /22: 1 /24: 9 /30: 4
/32: 49
IP Route Table for VRF "management" Total number of routes: 10 Total number of paths: 10 Best paths per protocol: Backup paths per protocol: am : 2 None local : 1
direct : 1
static : 1
broadcast : 5
Number of routes per mask-length: /0 : 1 /8 : 1 /24: 1 /32: 7
IP Route Table for VRF "test" Total number of routes: 13 Total number of paths: 13 Best paths per protocol: Backup paths per protocol: am : 2 None local : 2
direct : 2
broadcast : 7
Number of routes per mask-length: /8 : 1 /30: 2 /32: 10

show ip route summary vrf red

show ip route summary vrf red

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 ip route summary vrf red ",
  "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": {
        "outputs": {
            "output": {
                "body": "", 
                "code": "200", 
                "input": "show ip route summary vrf red ", 
                "msg": "Success"
            }
        }, 
        "sid": "eoc", 
        "type": "cli_show", 
        "version": "1.0"
    }
}

The CLI output example below corresponds to the payload example in the code pane on the right. For more information about the show ip route summary vrf red command, see the CLI command reference:

http//www.cisco.com/c/en/us/support/switches/nexus-3000-series-switches/products-command-reference-list.html

CLI Output
Switch# show ip route summary vrf red 
No IP Route Table for VRF "red"

show ip route vrf all

show ip route vrf 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 ip route vrf 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": {
        "outputs": {
            "output": {
                "body": {
                    "TABLE_vrf": {
                        "ROW_vrf": [
                            {
                                "TABLE_addrf": {
                                    "ROW_addrf": {
                                        "TABLE_prefix": {
                                            "ROW_prefix": [
                                                {
                                                    "TABLE_path": {
                                                        "ROW_path": {
                                                            "clientname": "static", 
                                                            "ifname": "Null0", 
                                                            "metric": 0, 
                                                            "pref": 1, 
                                                            "ubest": "true", 
                                                            "uptime": "P7DT12H2M13S"
                                                        }
                                                    }, 
                                                    "attached": "false", 
                                                    "ipprefix": "7.57.0.0/16", 
                                                    "mcast-nhops": 0, 
                                                    "ucast-nhops": 1
                                                }, 
                                                {
                                                    "TABLE_path": {
                                                        "ROW_path": {
                                                            "clientname": "direct", 
                                                            "ifname": "Vlan253", 
                                                            "ipnexthop": "7.57.253.2", 
                                                            "metric": 0, 
                                                            "pref": 0, 
                                                            "ubest": "true", 
                                                            "uptime": "P7DT12H42S"
                                                        }
                                                    }, 
                                                    "attached": "true", 
                                                    "ipprefix": "7.57.253.0/30", 
                                                    "mcast-nhops": 0, 
                                                    "ucast-nhops": 1
                                                }, 
                                                {
                                                    "TABLE_path": {
                                                        "ROW_path": {
                                                            "clientname": "local", 
                                                            "ifname": "Vlan253", 
                                                            "ipnexthop": "7.57.253.2", 
                                                            "metric": 0, 
                                                            "pref": 0, 
                                                            "ubest": "true", 
                                                            "uptime": "P7DT12H42S"
                                                        }
                                                    }, 
                                                    "attached": "true", 
                                                    "ipprefix": "7.57.253.2/32", 
                                                    "mcast-nhops": 0, 
                                                    "ucast-nhops": 1
                                                }, 
                                                {
                                                    "TABLE_path": {
                                                        "ROW_path": [
                                                            {
                                                                "clientname": "bgp-65057", 
                                                                "ipnexthop": "10.100.157.1", 
                                                                "metric": 0, 
                                                                "pref": 20, 
                                                                "tag": 65059, 
                                                                "type": "external", 
                                                                "ubest": "true", 
                                                                "uptime": "P7DT11H59M3S"
                                                            }, 
                                                            {
                                                                "clientname": "bgp-65057", 
                                                                "ipnexthop": "10.100.157.9", 
                                                                "metric": 0, 
                                                                "pref": 20, 
                                                                "tag": 65059, 
                                                                "type": "external", 
                                                                "ubest": "true", 
                                                                "uptime": "P7DT11H59M3S"
                                                            }
                                                        ]
                                                    }, 
                                                    "attached": "false", 
                                                    "ipprefix": "7.57.255.1/32", 
                                                    "mcast-nhops": 0, 
                                                    "ucast-nhops": 2
                                                }, 
                                                {
                                                    "TABLE_path": {
                                                        "ROW_path": [
                                                            {
                                                                "clientname": "local", 
                                                                "ifname": "Lo0", 
                                                                "ipnexthop": "7.57.255.2", 
                                                                "metric": 0, 
                                                                "pref": 0, 
                                                                "ubest": "true", 
                                                                "uptime": "P7DT12H2M10S"
                                                            }, 
                                                            {
                                                                "clientname": "direct", 
                                                                "ifname": "Lo0", 
                                                                "ipnexthop": "7.57.255.2", 
                                                                "metric": 0, 
                                                                "pref": 0, 
                                                                "ubest": "true", 
                                                                "uptime": "P7DT12H2M10S"
                                                            }
                                                        ]
                                                    }, 
                                                    "attached": "true", 
                                                    "ipprefix": "7.57.255.2/32", 
                                                    "mcast-nhops": 0, 
                                                    "ucast-nhops": 2
                                                }, 
                                                {
                                                    "TABLE_path": {
                                                        "ROW_path": {
                                                            "clientname": "ospf-1", 
                                                            "ifname": "Vlan253", 
                                                            "ipnexthop": "7.57.253.1", 
                                                            "metric": 42, 
                                                            "pref": 110, 
                                                            "type": "intra", 
                                                            "ubest": "true", 
                                                            "uptime": "P7DT12H30S"
                                                        }
                                                    }, 
                                                    "attached": "false", 
                                                    "ipprefix": "8.8.8.0/24", 
                                                    "mcast-nhops": 0, 
                                                    "ucast-nhops": 1
                                                }, 
                                                {
                                                    "TABLE_path": {
                                                        "ROW_path": {
                                                            "clientname": "ospf-1", 
                                                            "ifname": "Vlan253", 
                                                            "ipnexthop": "7.57.253.1", 
                                                            "metric": 42, 
                                                            "pref": 110, 
                                                            "type": "intra", 
                                                            "ubest": "true", 
                                                            "uptime": "P7DT12H30S"
                                                        }
                                                    }, 
                                                    "attached": "false", 
                                                    "ipprefix": "9.9.9.0/24", 
                                                    "mcast-nhops": 0, 
                                                    "ucast-nhops": 1
                                                }, 
                                                {
                                                    "TABLE_path": {
                                                        "ROW_path": {
                                                            "clientname": "static", 
                                                            "ifname": "Null0", 
                                                            "metric": 0, 
                                                            "pref": 1, 
                                                            "ubest": "true", 
                                                            "uptime": "P7DT12H2M13S"
                                                        }
                                                    }, 
                                                    "attached": "false", 
                                                    "ipprefix": "10.0.0.0/8", 
                                                    "mcast-nhops": 0, 
                                                    "ucast-nhops": 1
                                                }, 
                                                {
                                                    "TABLE_path": {
                                                        "ROW_path": {
                                                            "clientname": "static", 
                                                            "ifname": "Null0", 
                                                            "metric": 0, 
                                                            "pref": 1, 
                                                            "ubest": "true", 
                                                            "uptime": "P7DT12H2M13S"
                                                        }
                                                    }, 
                                                    "attached": "false", 
                                                    "ipprefix": "10.57.0.0/16", 
                                                    "mcast-nhops": 0, 
                                                    "ucast-nhops": 1
                                                }, 
                                                {
                                                    "TABLE_path": {
                                                        "ROW_path": {
                                                            "clientname": "direct", 
                                                            "ifname": "Vlan8", 
                                                            "ipnexthop": "10.57.8.3", 
                                                            "metric": 0, 
                                                            "pref": 0, 
                                                            "ubest": "true", 
                                                            "uptime": "P7DT12H52S"
                                                        }
                                                    }, 
                                                    "attached": "true", 
                                                    "ipprefix": "10.57.8.0/22", 
                                                    "mcast-nhops": 0, 
                                                    "ucast-nhops": 1
                                                }, 
                                                {
                                                    "TABLE_path": {
                                                        "ROW_path": {
                                                            "clientname": "local", 
                                                            "ifname": "Vlan8", 
                                                            "ipnexthop": "10.57.8.3", 
                                                            "metric": 0, 
                                                            "pref": 0, 
                                                            "ubest": "true", 
                                                            "uptime": "P7DT12H52S"
                                                        }
                                                    }, 
                                                    "attached": "true", 
                                                    "ipprefix": "10.57.8.3/32", 
                                                    "mcast-nhops": 0, 
                                                    "ucast-nhops": 1
                                                }, 
                                                {
                                                    "TABLE_path": {
                                                        "ROW_path": {
                                                            "clientname": "direct", 
                                                            "ifname": "Vlan50", 
                                                            "ipnexthop": "10.57.50.4", 
                                                            "metric": 0, 
                                                            "pref": 0, 
                                                            "ubest": "true", 
                                                            "uptime": "P7DT12H42S"
                                                        }
                                                    }, 
                                                    "attached": "true", 
                                                    "ipprefix": "10.57.50.0/24", 
                                                    "mcast-nhops": 0, 
                                                    "ucast-nhops": 1
                                                }, 
                                                {
                                                    "TABLE_path": {
                                                        "ROW_path": {
                                                            "clientname": "local", 
                                                            "ifname": "Vlan50", 
                                                            "ipnexthop": "10.57.50.4", 
                                                            "metric": 0, 
                                                            "pref": 0, 
                                                            "ubest": "true", 
                                                            "uptime": "P7DT12H42S"
                                                        }
                                                    }, 
                                                    "attached": "true", 
                                                    "ipprefix": "10.57.50.4/32", 
                                                    "mcast-nhops": 0, 
                                                    "ucast-nhops": 1
                                                }, 
                                                {
                                                    "TABLE_path": {
                                                        "ROW_path": {
                                                            "clientname": "direct", 
                                                            "ifname": "Eth1/1", 
                                                            "ipnexthop": "10.100.90.129", 
                                                            "metric": 0, 
                                                            "pref": 0, 
                                                            "ubest": "true", 
                                                            "uptime": "P6DT12H2M24S"
                                                        }
                                                    }, 
                                                    "attached": "true", 
                                                    "ipprefix": "10.100.90.128/30", 
                                                    "mcast-nhops": 0, 
                                                    "ucast-nhops": 1
                                                }, 
                                                {
                                                    "TABLE_path": {
                                                        "ROW_path": {
                                                            "clientname": "local", 
                                                            "ifname": "Eth1/1", 
                                                            "ipnexthop": "10.100.90.129", 
                                                            "metric": 0, 
                                                            "pref": 0, 
                                                            "ubest": "true", 
                                                            "uptime": "P6DT12H2M24S"
                                                        }
                                                    }, 
                                                    "attached": "true", 
                                                    "ipprefix": "10.100.90.129/32", 
                                                    "mcast-nhops": 0, 
                                                    "ucast-nhops": 1
                                                }, 
                                                {
                                                    "TABLE_path": {
                                                        "ROW_path": {
                                                            "clientname": "direct", 
                                                            "ifname": "Eth1/2", 
                                                            "ipnexthop": "10.100.157.2", 
                                                            "metric": 0, 
                                                            "pref": 0, 
                                                            "ubest": "true", 
                                                            "uptime": "P7DT12H56S"
                                                        }
                                                    }, 
                                                    "attached": "true", 
                                                    "ipprefix": "10.100.157.0/30", 
                                                    "mcast-nhops": 0, 
                                                    "ucast-nhops": 1
                                                }, 
                                                {
                                                    "TABLE_path": {
                                                        "ROW_path": {
                                                            "clientname": "local", 
                                                            "ifname": "Eth1/2", 
                                                            "ipnexthop": "10.100.157.2", 
                                                            "metric": 0, 
                                                            "pref": 0, 
                                                            "ubest": "true", 
                                                            "uptime": "P7DT12H56S"
                                                        }
                                                    }, 
                                                    "attached": "true", 
                                                    "ipprefix": "10.100.157.2/32", 
                                                    "mcast-nhops": 0, 
                                                    "ucast-nhops": 1
                                                }, 
                                                {
                                                    "TABLE_path": {
                                                        "ROW_path": {
                                                            "clientname": "direct", 
                                                            "ifname": "Eth1/4", 
                                                            "ipnexthop": "10.100.157.10", 
                                                            "metric": 0, 
                                                            "pref": 0, 
                                                            "ubest": "true", 
                                                            "uptime": "P7DT12H56S"
                                                        }
                                                    }, 
                                                    "attached": "true", 
                                                    "ipprefix": "10.100.157.8/30", 
                                                    "mcast-nhops": 0, 
                                                    "ucast-nhops": 1
                                                }, 
                                                {
                                                    "TABLE_path": {
                                                        "ROW_path": {
                                                            "clientname": "local", 
                                                            "ifname": "Eth1/4", 
                                                            "ipnexthop": "10.100.157.10", 
                                                            "metric": 0, 
                                                            "pref": 0, 
                                                            "ubest": "true", 
                                                            "uptime": "P7DT12H56S"
                                                        }
                                                    }, 
                                                    "attached": "true", 
                                                    "ipprefix": "10.100.157.10/32", 
                                                    "mcast-nhops": 0, 
                                                    "ucast-nhops": 1
                                                }, 
                                                {
                                                    "TABLE_path": {
                                                        "ROW_path": {
                                                            "clientname": "static", 
                                                            "ifname": "Eth1/5", 
                                                            "ipnexthop": "94.1.1.10", 
                                                            "metric": 0, 
                                                            "pref": 1, 
                                                            "ubest": "true", 
                                                            "uptime": "P7DT12H1M45S"
                                                        }
                                                    }, 
                                                    "attached": "false", 
                                                    "ipprefix": "17.0.1.1/32", 
                                                    "mcast-nhops": 0, 
                                                    "ucast-nhops": 1
                                                }, 
                                                {
                                                    "TABLE_path": {
                                                        "ROW_path": {
                                                            "clientname": "static", 
                                                            "ifname": "Eth1/5", 
                                                            "ipnexthop": "94.1.1.10", 
                                                            "metric": 0, 
                                                            "pref": 1, 
                                                            "ubest": "true", 
                                                            "uptime": "P7DT12H1M45S"
                                                        }
                                                    }, 
                                                    "attached": "false", 
                                                    "ipprefix": "17.0.1.2/32", 
                                                    "mcast-nhops": 0, 
                                                    "ucast-nhops": 1
                                                }, 
                                                {
                                                    "TABLE_path": {
                                                        "ROW_path": {
                                                            "clientname": "static", 
                                                            "ifname": "Eth1/5", 
                                                            "ipnexthop": "94.1.1.10", 
                                                            "metric": 0, 
                                                            "pref": 1, 
                                                            "ubest": "true", 
                                                            "uptime": "P7DT12H1M45S"
                                                        }
                                                    }, 
                                                    "attached": "false", 
                                                    "ipprefix": "17.0.1.3/32", 
                                                    "mcast-nhops": 0, 
                                                    "ucast-nhops": 1
                                                }, 
                                                {
                                                    "TABLE_path": {
                                                        "ROW_path": [
                                                            {
                                                                "clientname": "bgp-65057", 
                                                                "ipnexthop": "10.100.157.1", 
                                                                "metric": 0, 
                                                                "pref": 20, 
                                                                "tag": 65059, 
                                                                "type": "external", 
                                                                "ubest": "true", 
                                                                "uptime": "P7DT11H59M3S"
                                                            }, 
                                                            {
                                                                "clientname": "bgp-65057", 
                                                                "ipnexthop": "10.100.157.9", 
                                                                "metric": 0, 
                                                                "pref": 20, 
                                                                "tag": 65059, 
                                                                "type": "external", 
                                                                "ubest": "true", 
                                                                "uptime": "P7DT11H59M3S"
                                                            }
                                                        ]
                                                    }, 
                                                    "attached": "false", 
                                                    "ipprefix": "33.33.33.33/32", 
                                                    "mcast-nhops": 0, 
                                                    "ucast-nhops": 2
                                                }, 
                                                {
                                                    "TABLE_path": {
                                                        "ROW_path": {
                                                            "clientname": "direct", 
                                                            "ifname": "Eth1/1.50", 
                                                            "ipnexthop": "89.1.1.1", 
                                                            "metric": 0, 
                                                            "pref": 0, 
                                                            "ubest": "true", 
                                                            "uptime": "P6DT12H2M24S"
                                                        }
                                                    }, 
                                                    "attached": "true", 
                                                    "ipprefix": "89.1.1.0/24", 
                                                    "mcast-nhops": 0, 
                                                    "ucast-nhops": 1
                                                }, 
                                                {
                                                    "TABLE_path": {
                                                        "ROW_path": {
                                                            "clientname": "local", 
                                                            "ifname": "Eth1/1.50", 
                                                            "ipnexthop": "89.1.1.1", 
                                                            "metric": 0, 
                                                            "pref": 0, 
                                                            "ubest": "true", 
                                                            "uptime": "P6DT12H2M24S"
                                                        }
                                                    }, 
                                                    "attached": "true", 
                                                    "ipprefix": "89.1.1.1/32", 
                                                    "mcast-nhops": 0, 
                                                    "ucast-nhops": 1
                                                }, 
                                                {
                                                    "TABLE_path": {
                                                        "ROW_path": {
                                                            "clientname": "direct", 
                                                            "ifname": "Eth1/1.51", 
                                                            "ipnexthop": "89.1.2.1", 
                                                            "metric": 0, 
                                                            "pref": 0, 
                                                            "ubest": "true", 
                                                            "uptime": "P6DT12H2M24S"
                                                        }
                                                    }, 
                                                    "attached": "true", 
                                                    "ipprefix": "89.1.2.0/24", 
                                                    "mcast-nhops": 0, 
                                                    "ucast-nhops": 1
                                                }, 
                                                {
                                                    "TABLE_path": {
                                                        "ROW_path": {
                                                            "clientname": "local", 
                                                            "ifname": "Eth1/1.51", 
                                                            "ipnexthop": "89.1.2.1", 
                                                            "metric": 0, 
                                                            "pref": 0, 
                                                            "ubest": "true", 
                                                            "uptime": "P6DT12H2M24S"
                                                        }
                                                    }, 
                                                    "attached": "true", 
                                                    "ipprefix": "89.1.2.1/32", 
                                                    "mcast-nhops": 0, 
                                                    "ucast-nhops": 1
                                                }, 
                                                {
                                                    "TABLE_path": {
                                                        "ROW_path": {
                                                            "clientname": "direct", 
                                                            "ifname": "Eth1/1.52", 
                                                            "ipnexthop": "89.1.3.1", 
                                                            "metric": 0, 
                                                            "pref": 0, 
                                                            "ubest": "true", 
                                                            "uptime": "P6DT12H2M24S"
                                                        }
                                                    }, 
                                                    "attached": "true", 
                                                    "ipprefix": "89.1.3.0/24", 
                                                    "mcast-nhops": 0, 
                                                    "ucast-nhops": 1
                                                }, 
                                                {
                                                    "TABLE_path": {
                                                        "ROW_path": {
                                                            "clientname": "local", 
                                                            "ifname": "Eth1/1.52", 
                                                            "ipnexthop": "89.1.3.1", 
                                                            "metric": 0, 
                                                            "pref": 0, 
                                                            "ubest": "true", 
                                                            "uptime": "P6DT12H2M24S"
                                                        }
                                                    }, 
                                                    "attached": "true", 
                                                    "ipprefix": "89.1.3.1/32", 
                                                    "mcast-nhops": 0, 
                                                    "ucast-nhops": 1
                                                }, 
                                                {
                                                    "TABLE_path": {
                                                        "ROW_path": {
                                                            "clientname": "direct", 
                                                            "ifname": "Eth1/1.53", 
                                                            "ipnexthop": "89.1.4.1", 
                                                            "metric": 0, 
                                                            "pref": 0, 
                                                            "ubest": "true", 
                                                            "uptime": "P6DT12H2M24S"
                                                        }
                                                    }, 
                                                    "attached": "true", 
                                                    "ipprefix": "89.1.4.0/24", 
                                                    "mcast-nhops": 0, 
                                                    "ucast-nhops": 1
                                                }, 
                                                {
                                                    "TABLE_path": {
                                                        "ROW_path": {
                                                            "clientname": "local", 
                                                            "ifname": "Eth1/1.53", 
                                                            "ipnexthop": "89.1.4.1", 
                                                            "metric": 0, 
                                                            "pref": 0, 
                                                            "ubest": "true", 
                                                            "uptime": "P6DT12H2M24S"
                                                        }
                                                    }, 
                                                    "attached": "true", 
                                                    "ipprefix": "89.1.4.1/32", 
                                                    "mcast-nhops": 0, 
                                                    "ucast-nhops": 1
                                                }, 
                                                {
                                                    "TABLE_path": {
                                                        "ROW_path": {
                                                            "clientname": "direct", 
                                                            "ifname": "Eth1/5", 
                                                            "ipnexthop": "94.1.1.96", 
                                                            "metric": 0, 
                                                            "pref": 0, 
                                                            "ubest": "true", 
                                                            "uptime": "P7DT12H1M45S"
                                                        }
                                                    }, 
                                                    "attached": "true", 
                                                    "ipprefix": "94.1.1.0/24", 
                                                    "mcast-nhops": 0, 
                                                    "ucast-nhops": 1
                                                }, 
                                                {
                                                    "TABLE_path": {
                                                        "ROW_path": {
                                                            "clientname": "local", 
                                                            "ifname": "Eth1/5", 
                                                            "ipnexthop": "94.1.1.96", 
                                                            "metric": 0, 
                                                            "pref": 0, 
                                                            "ubest": "true", 
                                                            "uptime": "P7DT12H1M45S"
                                                        }
                                                    }, 
                                                    "attached": "true", 
                                                    "ipprefix": "94.1.1.96/32", 
                                                    "mcast-nhops": 0, 
                                                    "ucast-nhops": 1
                                                }, 
                                                {
                                                    "TABLE_path": {
                                                        "ROW_path": {
                                                            "clientname": "direct", 
                                                            "ifname": "Eth1/7", 
                                                            "ipnexthop": "192.168.161.2", 
                                                            "metric": 0, 
                                                            "pref": 0, 
                                                            "ubest": "true", 
                                                            "uptime": "P7DT12H53S"
                                                        }
                                                    }, 
                                                    "attached": "true", 
                                                    "ipprefix": "192.168.161.0/24", 
                                                    "mcast-nhops": 0, 
                                                    "ucast-nhops": 1
                                                }, 
                                                {
                                                    "TABLE_path": {
                                                        "ROW_path": {
                                                            "clientname": "local", 
                                                            "ifname": "Eth1/7", 
                                                            "ipnexthop": "192.168.161.2", 
                                                            "metric": 0, 
                                                            "pref": 0, 
                                                            "ubest": "true", 
                                                            "uptime": "P7DT12H53S"
                                                        }
                                                    }, 
                                                    "attached": "true", 
                                                    "ipprefix": "192.168.161.2/32", 
                                                    "mcast-nhops": 0, 
                                                    "ucast-nhops": 1
                                                }
                                            ]
                                        }, 
                                        "addrf": "ipv4"
                                    }
                                }, 
                                "vrf-name-out": "default"
                            }, 
                            {
                                "TABLE_addrf": {
                                    "ROW_addrf": {
                                        "TABLE_prefix": {
                                            "ROW_prefix": [
                                                {
                                                    "TABLE_path": {
                                                        "ROW_path": {
                                                            "clientname": "static", 
                                                            "ipnexthop": "10.197.122.1", 
                                                            "metric": 0, 
                                                            "pref": 1, 
                                                            "ubest": "true", 
                                                            "uptime": "P7DT12H1M36S"
                                                        }
                                                    }, 
                                                    "attached": "false", 
                                                    "ipprefix": "0.0.0.0/0", 
                                                    "mcast-nhops": 0, 
                                                    "ucast-nhops": 1
                                                }, 
                                                {
                                                    "TABLE_path": {
                                                        "ROW_path": {
                                                            "clientname": "direct", 
                                                            "ifname": "mgmt0", 
                                                            "ipnexthop": "10.197.122.96", 
                                                            "metric": 0, 
                                                            "pref": 0, 
                                                            "ubest": "true", 
                                                            "uptime": "P7DT12H2M7S"
                                                        }
                                                    }, 
                                                    "attached": "true", 
                                                    "ipprefix": "10.197.122.0/24", 
                                                    "mcast-nhops": 0, 
                                                    "ucast-nhops": 1
                                                }, 
                                                {
                                                    "TABLE_path": {
                                                        "ROW_path": {
                                                            "clientname": "local", 
                                                            "ifname": "mgmt0", 
                                                            "ipnexthop": "10.197.122.96", 
                                                            "metric": 0, 
                                                            "pref": 0, 
                                                            "ubest": "true", 
                                                            "uptime": "P7DT12H2M7S"
                                                        }
                                                    }, 
                                                    "attached": "true", 
                                                    "ipprefix": "10.197.122.96/32", 
                                                    "mcast-nhops": 0, 
                                                    "ucast-nhops": 1
                                                }
                                            ]
                                        }, 
                                        "addrf": "ipv4"
                                    }
                                }, 
                                "vrf-name-out": "management"
                            }, 
                            {
                                "TABLE_addrf": {
                                    "ROW_addrf": {
                                        "TABLE_prefix": {
                                            "ROW_prefix": [
                                                {
                                                    "TABLE_path": {
                                                        "ROW_path": {
                                                            "clientname": "direct", 
                                                            "ifname": "Eth1/45", 
                                                            "ipnexthop": "7.57.253.5", 
                                                            "metric": 0, 
                                                            "pref": 0, 
                                                            "ubest": "true", 
                                                            "uptime": "P7DT12H48S"
                                                        }
                                                    }, 
                                                    "attached": "true", 
                                                    "ipprefix": "7.57.253.4/30", 
                                                    "mcast-nhops": 0, 
                                                    "ucast-nhops": 1
                                                }, 
                                                {
                                                    "TABLE_path": {
                                                        "ROW_path": {
                                                            "clientname": "local", 
                                                            "ifname": "Eth1/45", 
                                                            "ipnexthop": "7.57.253.5", 
                                                            "metric": 0, 
                                                            "pref": 0, 
                                                            "ubest": "true", 
                                                            "uptime": "P7DT12H48S"
                                                        }
                                                    }, 
                                                    "attached": "true", 
                                                    "ipprefix": "7.57.253.5/32", 
                                                    "mcast-nhops": 0, 
                                                    "ucast-nhops": 1
                                                }, 
                                                {
                                                    "TABLE_path": {
                                                        "ROW_path": {
                                                            "clientname": "direct", 
                                                            "ifname": "Eth1/46", 
                                                            "ipnexthop": "7.57.253.9", 
                                                            "metric": 0, 
                                                            "pref": 0, 
                                                            "ubest": "true", 
                                                            "uptime": "P7DT12H46S"
                                                        }
                                                    }, 
                                                    "attached": "true", 
                                                    "ipprefix": "7.57.253.8/30", 
                                                    "mcast-nhops": 0, 
                                                    "ucast-nhops": 1
                                                }, 
                                                {
                                                    "TABLE_path": {
                                                        "ROW_path": {
                                                            "clientname": "local", 
                                                            "ifname": "Eth1/46", 
                                                            "ipnexthop": "7.57.253.9", 
                                                            "metric": 0, 
                                                            "pref": 0, 
                                                            "ubest": "true", 
                                                            "uptime": "P7DT12H46S"
                                                        }
                                                    }, 
                                                    "attached": "true", 
                                                    "ipprefix": "7.57.253.9/32", 
                                                    "mcast-nhops": 0, 
                                                    "ucast-nhops": 1
                                                }
                                            ]
                                        }, 
                                        "addrf": "ipv4"
                                    }
                                }, 
                                "vrf-name-out": "test"
                            }
                        ]
                    }
                }, 
                "code": "200", 
                "input": "show ip route vrf all ", 
                "msg": "Success"
            }
        }, 
        "sid": "eoc", 
        "type": "cli_show", 
        "version": "1.0"
    }
}

The CLI output example below corresponds to the payload example in the code pane on the right. For more information about the show ip route vrf all command, see the CLI command reference:

http//www.cisco.com/c/en/us/support/switches/nexus-3000-series-switches/products-command-reference-list.html

CLI Output
Switch# show ip route vrf all 
IP Route Table for VRF "default"
'' denotes best ucast next-hop
'**' denotes best mcast next-hop
'[x/y]' denotes [preference/metric]
'% string ' in via output denotes VRF  string 

7.57.0.0/16, ubest/mbest: 1/0
    via Null0, [1/0], 1w0d, static
7.57.253.0/30, ubest/mbest: 1/0, attached
    via 7.57.253.2, Vlan253, [0/0], 1w0d, direct
7.57.253.2/32, ubest/mbest: 1/0, attached
    via 7.57.253.2, Vlan253, [0/0], 1w0d, local
7.57.255.1/32, ubest/mbest: 2/0
    via 10.100.157.1, [20/0], 1w0d, bgp-65057, external, tag 65059 (backup)
    via 10.100.157.9, [20/0], 1w0d, bgp-65057, external, tag 65059
7.57.255.2/32, ubest/mbest: 2/0, attached
    via 7.57.255.2, Lo0, [0/0], 1w0d, local
    via 7.57.255.2, Lo0, [0/0], 1w0d, direct
8.8.8.0/24, ubest/mbest: 1/0
    via 7.57.253.1, Vlan253, [110/42], 1w0d, ospf-1, intra
9.9.9.0/24, ubest/mbest: 1/0
    via 7.57.253.1, Vlan253, [110/42], 1w0d, ospf-1, intra
10.0.0.0/8, ubest/mbest: 1/0
    via Null0, [1/0], 1w0d, static
10.57.0.0/16, ubest/mbest: 1/0
    via Null0, [1/0], 1w0d, static
10.57.8.0/22, ubest/mbest: 1/0, attached
    via 10.57.8.3, Vlan8, [0/0], 1w0d, direct
10.57.8.3/32, ubest/mbest: 1/0, attached
    via 10.57.8.3, Vlan8, [0/0], 1w0d, local
10.57.50.0/24, ubest/mbest: 1/0, attached
    via 10.57.50.4, Vlan50, [0/0], 1w0d, direct
10.57.50.4/32, ubest/mbest: 1/0, attached
    via 10.57.50.4, Vlan50, [0/0], 1w0d, local
10.100.90.128/30, ubest/mbest: 1/0, attached
    via 10.100.90.129, Eth1/1, [0/0], 6d12h, direct
10.100.90.129/32, ubest/mbest: 1/0, attached
    via 10.100.90.129, Eth1/1, [0/0], 6d12h, local
10.100.157.0/30, ubest/mbest: 1/0, attached
    via 10.100.157.2, Eth1/2, [0/0], 1w0d, direct
10.100.157.2/32, ubest/mbest: 1/0, attached
    via 10.100.157.2, Eth1/2, [0/0], 1w0d, local
10.100.157.8/30, ubest/mbest: 1/0, attached
    via 10.100.157.10, Eth1/4, [0/0], 1w0d, direct
10.100.157.10/32, ubest/mbest: 1/0, attached
    via 10.100.157.10, Eth1/4, [0/0], 1w0d, local
17.0.1.1/32, ubest/mbest: 1/0
    via 94.1.1.10, Eth1/5, [1/0], 1w0d, static
17.0.1.2/32, ubest/mbest: 1/0
    via 94.1.1.10, Eth1/5, [1/0], 1w0d, static
17.0.1.3/32, ubest/mbest: 1/0
    via 94.1.1.10, Eth1/5, [1/0], 1w0d, static
33.33.33.33/32, ubest/mbest: 2/0
    via 10.100.157.1, [20/0], 1w0d, bgp-65057, external, tag 65059 (backup)
    via 10.100.157.9, [20/0], 1w0d, bgp-65057, external, tag 65059
89.1.1.0/24, ubest/mbest: 1/0, attached
    via 89.1.1.1, Eth1/1.50, [0/0], 6d12h, direct
89.1.1.1/32, ubest/mbest: 1/0, attached
    via 89.1.1.1, Eth1/1.50, [0/0], 6d12h, local
89.1.2.0/24, ubest/mbest: 1/0, attached
    via 89.1.2.1, Eth1/1.51, [0/0], 6d12h, direct
89.1.2.1/32, ubest/mbest: 1/0, attached
    via 89.1.2.1, Eth1/1.51, [0/0], 6d12h, local
89.1.3.0/24, ubest/mbest: 1/0, attached
    via 89.1.3.1, Eth1/1.52, [0/0], 6d12h, direct
89.1.3.1/32, ubest/mbest: 1/0, attached
    via 89.1.3.1, Eth1/1.52, [0/0], 6d12h, local
89.1.4.0/24, ubest/mbest: 1/0, attached
    via 89.1.4.1, Eth1/1.53, [0/0], 6d12h, direct
89.1.4.1/32, ubest/mbest: 1/0, attached
    via 89.1.4.1, Eth1/1.53, [0/0], 6d12h, local
94.1.1.0/24, ubest/mbest: 1/0, attached
    via 94.1.1.96, Eth1/5, [0/0], 1w0d, direct
94.1.1.96/32, ubest/mbest: 1/0, attached
    via 94.1.1.96, Eth1/5, [0/0], 1w0d, local
192.168.161.0/24, ubest/mbest: 1/0, attached
    via 192.168.161.2, Eth1/7, [0/0], 1w0d, direct
192.168.161.2/32, ubest/mbest: 1/0, attached
    via 192.168.161.2, Eth1/7, [0/0], 1w0d, local

IP Route Table for VRF "management"
'' denotes best ucast next-hop
'' denotes best mcast next-hop
'[x/y]' denotes [preference/metric]
'% string ' in via output denotes VRF  string 

0.0.0.0/0, ubest/mbest: 1/0
    via 10.197.122.1, [1/0], 1w0d, static
10.197.122.0/24, ubest/mbest: 1/0, attached
    via 10.197.122.96, mgmt0, [0/0], 1w0d, direct
10.197.122.96/32, ubest/mbest: 1/0, attached
    via 10.197.122.96, mgmt0, [0/0], 1w0d, local

IP Route Table for VRF "test"
'' denotes best ucast next-hop
'' denotes best mcast next-hop
'[x/y]' denotes [preference/metric]
'% string ' in via output denotes VRF  string 

7.57.253.4/30, ubest/mbest: 1/0, attached
    via 7.57.253.5, Eth1/45, [0/0], 1w0d, direct
7.57.253.5/32, ubest/mbest: 1/0, attached
    via 7.57.253.5, Eth1/45, [0/0], 1w0d, local
7.57.253.8/30, ubest/mbest: 1/0, attached
    via 7.57.253.9, Eth1/46, [0/0], 1w0d, direct
7.57.253.9/32, ubest/mbest: 1/0, attached
    via 7.57.253.9, Eth1/46, [0/0], 1w0d, local


show ip route vrf blue

show ip route vrf blue

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 ip route vrf blue ",
  "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": {
        "outputs": {
            "output": {
                "body": "", 
                "code": "200", 
                "input": "show ip route vrf blue ", 
                "msg": "Success"
            }
        }, 
        "sid": "eoc", 
        "type": "cli_show", 
        "version": "1.0"
    }
}

The CLI output example below corresponds to the payload example in the code pane on the right. For more information about the show ip route vrf blue command, see the CLI command reference:

http//www.cisco.com/c/en/us/support/switches/nexus-3000-series-switches/products-command-reference-list.html

CLI Output
Switch# show ip route vrf blue 
No IP Route Table for VRF "blue"