show ipv6 dhcp relay
Python
Copy
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 ipv6 dhcp relay",
  "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": [
                            {
                                "TABLE_addr": {
                                    "ROW_addr": {
                                        "dst_intf": "", 
                                        "relay_address": "2007:55:3:1::5", 
                                        "vrf_name": {}
                                    }
                                }, 
                                "interface-name": "Vlan552", 
                                "intf_header": "0"
                            }, 
                            {
                                "TABLE_addr": {
                                    "ROW_addr": {
                                        "dst_intf": "", 
                                        "relay_address": "2007:60:3:1::5", 
                                        "vrf_name": {}
                                    }
                                }, 
                                "interface-name": "Vlan710", 
                                "intf_header": "0"
                            }, 
                            {
                                "TABLE_addr": {
                                    "ROW_addr": {
                                        "dst_intf": "", 
                                        "relay_address": "2007:7:23::5", 
                                        "vrf_name": {}
                                    }
                                }, 
                                "interface-name": "Vlan722", 
                                "intf_header": "0"
                            }, 
                            {
                                "TABLE_addr": {
                                    "ROW_addr": {
                                        "dst_intf": "", 
                                        "relay_address": "2007:75:3:1::5", 
                                        "vrf_name": {}
                                    }
                                }, 
                                "interface-name": "Vlan752", 
                                "intf_header": "0"
                            }, 
                            {
                                "TABLE_addr": {
                                    "ROW_addr": {
                                        "dst_intf": "", 
                                        "relay_address": "2007:7:71:1::5", 
                                        "vrf_name": {}
                                    }
                                }, 
                                "interface-name": "Vlan770", 
                                "intf_header": "0"
                            }, 
                            {
                                "TABLE_addr": {
                                    "ROW_addr": {
                                        "dst_intf": "", 
                                        "relay_address": "2007:60:1:1::5", 
                                        "vrf_name": {}
                                    }
                                }, 
                                "interface-name": "port-channel60", 
                                "intf_header": "0"
                            }, 
                            {
                                "TABLE_addr": {
                                    "ROW_addr": {
                                        "dst_intf": "", 
                                        "relay_address": "2007:60:2:1::5", 
                                        "vrf_name": {}
                                    }
                                }, 
                                "interface-name": "port-channel61.1", 
                                "intf_header": "0"
                            }, 
                            {
                                "TABLE_addr": {
                                    "ROW_addr": {
                                        "dst_intf": "", 
                                        "relay_address": "2007:60:5:1::5", 
                                        "vrf_name": {}
                                    }
                                }, 
                                "interface-name": "Ethernet1/47.1", 
                                "intf_header": "0"
                            }, 
                            {
                                "TABLE_addr": {
                                    "ROW_addr": {
                                        "dst_intf": "", 
                                        "relay_address": "2007:60:0:1::5", 
                                        "vrf_name": {}
                                    }
                                }, 
                                "interface-name": "Ethernet1/48", 
                                "intf_header": "0"
                            }
                        ]
                    }, 
                    "relay_cisco_option_enable": "disabled", 
                    "relay_service_enable": "enabled", 
                    "relay_vpn_enable": "disabled"
                }, 
                "code": "200", 
                "input": "show ipv6 dhcp relay", 
                "msg": "Success"
            }
        }, 
        "sid": "eoc", 
        "type": "cli_show", 
        "version": "1.0"
    }
}