show vrrs server
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 vrrs  server",
  "output_format": "json"
}

response = requests.post(url,data=json.dumps(payload), headers=myheaders,auth=(switchuser,switchpassword)).json()
output = json.dumps(response, indent=4, sort_keys=True)


{
  "ins_api": {
    "type": "cli_show",
    "version": "1.0",
    "sid": "eoc",
    "outputs": {
      "output": {
        "input": "show vrrs  server",
        "msg": "Success",
        "code": "200",
        "body": {
          "TABLE_srv": {
            "ROW_srv": [
              {
                "name": "vrrpVlan2v41",
                "af": "IPv4",
                "intf": "Vlan2",
                "state": "ACTIVE",
                "vmac": "0000.5e00.0101",
                "vip": "4.4.4.100",
                "TABLE_tag": {
                  "ROW_tag": {
                    "tag": "jsontest"
                  }
                }
              },
              {
                "name": "vrrpVlan2v61",
                "af": "IPv6",
                "intf": "Vlan2",
                "state": "ACTIVE",
                "vmac": "0000.5e00.0201",
                "vip": "fe80::101"
              },
              {
                "name": "vrrpVlan3v43",
                "af": "IPv4",
                "intf": "Vlan3",
                "state": "ACTIVE",
                "vmac": "0000.5e00.0103",
                "vip": "3.3.3.101"
              }
            ]
          }
        }
      }
    }
  }
}