08-18-2021 07:38 AM
Hello,
For a Postman Runner collection that I am working on I need to create a request that will update the description under the Fabric > Inventory > Interfaces side of the fabric. I usually do most of my scripting through just doing the config in the GUI and taking the API inspector POST payload and making that the body of my request. I do that with this item using this payload:
"{\"infraHPathS\":{\"attributes\":{\"rn\":\"hpaths-101_eth1_14\",\"dn\":\"uni/infra/hpaths-101_eth1_14\",\"descr\":\"TEST\",\"name\":\"101_eth1_14\"},\"children\":[{\"infraRsHPathAtt\":{\"attributes\":{\"dn\":\"uni/infra/hpaths-101_eth1_14/rsHPathAtt-[topology/pod-1/paths-101/pathep-[eth1/14]]\",\"tDn\":\"topology/pod-1/paths-101/pathep-[eth1/14]\"}}}]}}"
I get a
Solved! Go to Solution.
08-18-2021 09:55 PM
I usually do most of my scripting through just doing the config in the GUI and taking the API inspector POST payload and making that the body of my request.
That's exactly what I do as well. I have tested what you are trying to do, simply copying the url+payload from the API Inspector, changed the description and for me works just fine:
Stay safe,
Sergiu
08-18-2021 07:54 AM
08-18-2021 08:36 AM
Hello and thank you for your reply!
I have actually come across this one as well and the issue that I found for it is that is looks like it is for the Fabric > Access Policies side of things for the interface selector and not for the Inventory side for the physical port.
08-18-2021 09:55 PM
I usually do most of my scripting through just doing the config in the GUI and taking the API inspector POST payload and making that the body of my request.
That's exactly what I do as well. I have tested what you are trying to do, simply copying the url+payload from the API Inspector, changed the description and for me works just fine:
Stay safe,
Sergiu
08-19-2021 06:44 AM
This was beyond helpful! For some strange reason possibly the code that I am on 4.2 (6h) the API inspector added characters like " and \ that once I got rid of those in the body of my request it worked like a champ!
Thank you so much for your help!
08-19-2021 07:01 AM
Ah that was present for me as well (5.2), but I deleted it, to have a proper JSON body.
Stay safe,
Sergiu
08-19-2021 07:28 AM
Oh ok maybe its just something it does for that POST payload and I was just not use to that because the other ones that I have copied have not added those characters and pretty much just work right away.
Thank you again!
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