Auth to API w/ username & password and store cookie?
Posted: Tue May 25, 2021 4:25 pm
Hello all,
I have been investigating ways to query our Cisco APIC for our ACI deployment. There are some metrics that I have been able to pull from SNMP, however many of the metrics are only accessible via the API. To make things slightly more difficult, the API does not simply allow for creation of a key that can be passed along with the request. It requires either authentication with a username/password and storing a session cookie, or creating an x.509 certificate.
This link has been very helpful so far: https://nwmichl.net/2020/04/19/monitor- ... -rest-api/
I have carved up a bash script a bit and can make API calls - but I still need to find a good way to parse out the json response.
Before I get too far down a rabbit hole, I wanted to ask if it be at all possible to use the JSON wizard in XI to do this? I'm doubtful, judging by what is asked for in the wizard. I didn't stumble upon any documentation for it either, or maybe I missed it somewhere. I wasn't too certain what it was capable of doing.
Thank you for any assistance provided!
I have been investigating ways to query our Cisco APIC for our ACI deployment. There are some metrics that I have been able to pull from SNMP, however many of the metrics are only accessible via the API. To make things slightly more difficult, the API does not simply allow for creation of a key that can be passed along with the request. It requires either authentication with a username/password and storing a session cookie, or creating an x.509 certificate.
This link has been very helpful so far: https://nwmichl.net/2020/04/19/monitor- ... -rest-api/
I have carved up a bash script a bit and can make API calls - but I still need to find a good way to parse out the json response.
Before I get too far down a rabbit hole, I wanted to ask if it be at all possible to use the JSON wizard in XI to do this? I'm doubtful, judging by what is asked for in the wizard. I didn't stumble upon any documentation for it either, or maybe I missed it somewhere. I wasn't too certain what it was capable of doing.
Thank you for any assistance provided!