07-20-2023 10:52 AM
Hello there, I am using ISE API to get or post requests to it and I know that ISE's default response body is in XML format, I just wonder if I can just change that to JSON, (I know that I can set Accept header to application/json to accomplish that but I am in a situation I cant set the header parameters)... if there is a way please tell me.
Solved! Go to Solution.
07-20-2023 03:35 PM
https://duckduckgo.com/?t=ffab&q=Cisco+ISE+API+JSON+response
The #1 hit is ISE ERS API Examples which shows how to get JSON out of ISE. Headers are how you request content of a specific format (XML|JSON) however the ISE MNT APIs are XML only still.
You could try to pipe XML output through a tool like yq but it's not pretty :
curl --insecure --location \
--header 'Accept: application/xml' \
--user $ISE_REST_USERNAME:$ISE_REST_PASSWORD \
--request GET https://$ISE_HOSTNAME/ers/config/endpoint \
| yq -p xml
The ISE REST APIs are documented @ https://cs.co/ise-api and in the ISE PAN node for ISE 3.1+ via the built-in Swagger UI utility.
ISE ERS API Examples
ISE Postman Collections
Webinars:
▷ Cloud Load Balancing with ISE 2023/06/15▷ Cloud Load Balancing with ISE 2023/06/15
▷ Introduction to the Cisco Platform Exchange Grid (pxGrid) in ISE 2023/04/06
▷ Working with ISE pxGrid APIs 2023/02/02
▷ ISE in a Hybrid Cloud Environment 2022/12/06
▷ Automated ISE Provisioning and Patching 2022/11/03
▷ Practical ISE Automation with Ansible 2022/10/06
▷ ISE REST APIs Introduction 2022/10/04
▷ ISE 3.1 APIs, Ansible, and Automation 2021/07/06
▷ ISE REST APIs 2021/04/06
07-20-2023 11:00 AM
The only API response format is XML - JSON is not supported! Any conversion from XML to JSON or other format must be done by you.
07-20-2023 03:35 PM
https://duckduckgo.com/?t=ffab&q=Cisco+ISE+API+JSON+response
The #1 hit is ISE ERS API Examples which shows how to get JSON out of ISE. Headers are how you request content of a specific format (XML|JSON) however the ISE MNT APIs are XML only still.
You could try to pipe XML output through a tool like yq but it's not pretty :
curl --insecure --location \
--header 'Accept: application/xml' \
--user $ISE_REST_USERNAME:$ISE_REST_PASSWORD \
--request GET https://$ISE_HOSTNAME/ers/config/endpoint \
| yq -p xml
The ISE REST APIs are documented @ https://cs.co/ise-api and in the ISE PAN node for ISE 3.1+ via the built-in Swagger UI utility.
ISE ERS API Examples
ISE Postman Collections
Webinars:
▷ Cloud Load Balancing with ISE 2023/06/15▷ Cloud Load Balancing with ISE 2023/06/15
▷ Introduction to the Cisco Platform Exchange Grid (pxGrid) in ISE 2023/04/06
▷ Working with ISE pxGrid APIs 2023/02/02
▷ ISE in a Hybrid Cloud Environment 2022/12/06
▷ Automated ISE Provisioning and Patching 2022/11/03
▷ Practical ISE Automation with Ansible 2022/10/06
▷ ISE REST APIs Introduction 2022/10/04
▷ ISE 3.1 APIs, Ansible, and Automation 2021/07/06
▷ ISE REST APIs 2021/04/06
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide