show route-map test
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 route-map 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": {
    "type": "cli_show",
    "version": "1.0",
    "sid": "eoc",
    "outputs": {
      "output": {
        "input": "show route-map test ",
        "msg": "Success",
        "code": "200",
        "body": {
          "TABLE_rmap": {
            "ROW_rmap": {
              "name": "test",
              "action": "permit",
              "seq": 10,
              "TABLE_rmap_match": {
                "ROW_rmap_match": {
                  "match_type": "ip address prefix-lists",
                  "match_stmt": "pfx1"
                }
              },
              "TABLE_rmap_set": {
                "ROW_rmap_set": {
                  "set_type": "tag",
                  "set_stmt": "10"
                }
              }
            }
          }
        }
      }
    }
  }
}