show track brief
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 track 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)


{

    "TABLE_track_brief": {
        "ROW_track_brief": [{
                "st_brf_obj_id": 1,
                "st_brf_obj_type": "interface",
                "st_brf_obj_instance": "loopback0",
                "st_brf_obj_param": "Line-Protocol",
                "st_brf_obj_state": "UP",
                "st_brf_last_chg_time": "02:32:54"
            }, {
                "st_brf_obj_id": 2,
                "st_brf_obj_type": "Booleanand",
                "st_brf_obj_instance": "-----",
                "st_brf_obj_param": "Booleanandlist",
                "st_brf_obj_state": "UP",
                "st_brf_last_chg_time": "00:02:17"
            }, {
                "st_brf_obj_id": 3,
                "st_brf_obj_type": "Thresholdpercent",
                "st_brf_obj_instance": "-----",
                "st_brf_obj_param": "Threshpercen
                tlist",
                "st_brf_obj_state": "UP",
                "st_brf_last_chg_time": "00:00:51"
            }, {
                "st_brf_obj_id": 4,
                "st_brf_obj_type": "Thresholdweight",
                "st_brf_obj_instance": "-----",
                "st_brf_obj_param": "Threshweightlist",
                "st_brf_obj_state": "UP",
                "st_brf_last_chg_time": "00:00:31"
            }
        ]
    }
}