Now that's great and all, but what can Orchestrator help us do with it? Well with the addition of a couple of activities - "Convert XML to JSON" and "Convert JSON to XML" it all becomes quite easy! In my development with Orchestrator I have found using XPATH queries and trying to stay in the XML format is best for ease of use and for the product in general. XPATH query is a wonderful tool for pulling data out of XML based messages and is highly useful(and near a requirement) for developing strong automations with web service calls. The great Orchestrator development team has almost made it trivial for you to be able to work with both XML and JSON based web services. The eaiest case is to receive JSON back from a web call and then pass it into a "Convert JSON to XML" activity. The output XML will be a nicely and neatly formated piece of XML that you can easily do an xpath query from. For example
<para>A meta-markup language, used to create markup languages such as DocBook.</para>
(Sorry about the formatting)
Now doing XPATH queries on this xml is almost as trivial. If I want to pull out the Abbreviation, just XPATH Query it using "//Abbrev". (as an example). Before these activities you would have had to do string and regular expression work throughout a JSON response and that would have not been too pretty!
While this session is a short and sweet one, I could not go on without a video! So I have a quick (less than 10 minute) video on me using the JSON and XML conversion activities and running XPATH against it. (using the same demo JSON as above)
I hope after watching this you will feel confident in using JSON based web services in your automations. Please feel free to post any comments/questions/etc in the blog or send me an email.
No questions this week! Hopefully we'll get some in to answer for next week!
Ever week I will pick a handful of questions from you, the reading CPO public, to answer in this part of the blog. Please post comments/questions below. I will no longer be using the external e-mail from previous blogs.
Please also let me know if you like the format of this blog and what else you would like to see/know about. Feel free to give any ideas as to future blog posts, etc and I will be happy to post them. I hope to do more how-tos, best practices, tips, tricks, and hopefully some interviews of the important people behind the scenes of CPO.
WEEKLY AUTOMATION BLOG DISCLAIMER: As always, this is a blog and my (Shaun Roberts) thoughts on CPO, my thoughts on best practices, and my experiences with the product and customers. The above views are in no way representative of Cisco or any of it's partners, etc. None of these views, etc are supported and this is not a place to find standard product support. If you need standard product support please do so via the current call in numbers on Cisco.com or email firstname.lastname@example.org
Hello,I have recently detected a LACP balance issue which I seem unable to solve. That's why I decided to share what I found out so far in order to see if anybody else has also seen this. The switch is 3164Q with NX-OS 7.0.3.I7.6. Reproduced the same...
Hi, I just need to know the total consumption of the Catalyst 9410 with full config.This question is due each 3200 W AC power supplies states 16A but it don´t clarify if this is per PS or is a total per entry SW.Thank you guys.
Hello, Is it Posible to create a port channel between and F3 and M3 Card? I have a 2 Nexus 7702 with a M3 card and the other with and F3 card, so can i bring a portchannel between this 2? Thanks for the help.
I am labbing to learn eBGP underlay for EVPN so i did create following lab Spine: 65000Leaf-1:65001Leaf-2:65002 ## spinerouter bgp 65000
address-family ipv4 unicast
redistribute direct route-map TAG-UL