cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Announcements
configure & troubleshoot anyconnect
135
Views
0
Helpful
2
Replies
Highlighted
Beginner

ACI API - UCSD Invalid uri - escaped absolute path not valid

I'm using generic API tasks to query ACI on interface objects.  I'm pretty far down in my queries, and successful so far, but one query in particular fails and returns the following....

 

Oddly, this same path works with Postman.  I am successfully authenticating to ACI, and carrying my cookie strings between tasks.  Any ideas ??

 

ACI API Test (Execute Generic API) failed with error - Invalid uri '/api/node/mo/topology/pod-1/node-201/sys/phys-[eth1/96]/phys.json': escaped absolute path not valid, selectedContext=<None>

 

 

2 REPLIES 2
Beginner

Re: ACI API - UCSD Invalid uri - escaped absolute path not valid

It seems this is an issue with the use of [ ] in the api path. Is there an escape character or something that can be used to get around this issue?
Beginner

Re: ACI API - UCSD Invalid uri - escaped absolute path not valid

So, it’s a URL encoding issue. I did some research online, and found that UCS Director isn’t encoding the square braces natively, so it generates an error.

So this URI API Path - /api/node/mo/topology/pod-1/node-201/sys/phys-[eth1/96]/phys.json

The [ ] need to be encoded manually to this in Hex

Left Square Bracket ("[") 5B
Right Square Bracket ("]") 5D

/api/node/mo/topology/pod-1/node-201/sys/phys-%5Beth1/96%5D/phys.json

Once I replaced the [ with %5B and ] with %5D, UCS Director was able to properly send the API path to ACI and return the correct results.

Jul 14, 2019 18:42:31 CDT ALL ($) = {'totalCount':'1','imdata':[{'ethpmPhysIf':{'attributes':{'accessVlan':'unknown','allowedVlans':'','backplaneMac':'00:42:68:6D:4C:7A','bundleBupId':'1','bundleIndex':'unspecified','cfgAccessVlan':'unknown','cfgNativeVlan':'unknown','childAction':'','currErrIndex':'4294967295','diags':'none','dn':'topology/pod-1/node-201/sys/phys-[eth1/96]/phys','encap':'3','errDisTimerRunning':'no','errVlanStatusHt':'0','errVlans':'','hwBdId':'0','hwResourceId':'0','intfT':'phy','iod':'100','lastErrors':'0','lastLinkStChg':'1969-12-31T19:00:00.000-05:00','media':'2','modTs':'never','monPolDn':'uni/infra/moninfra-default','nativeVlan':'unknown','numOfSI':'0','operBitset':'4','operDceMode':'edge','operDuplex':'full','operEEERxWkTime':'0','operEEEState':'not-applicable','operEEETxWkTime':'0','operErrDisQual':'none','operFecMode':'disable-fec','operFlowCtrl':'0','operMdix':'auto','operMode':'trunk','operModeDetail':'unknown','operPhyEnSt':'unknown','operRouterMac':'00:00:00:00:00:00','operSpeed':'10G','operSt':'down','operStQual':'link-failure','operStQualCode':'0','operVlans':'','osSum':'failed','portCfgWaitFlags':'0','primaryVlan':'vlan-1','resetCtr':'0','siList':'','status':'','txT':'unknown','usage':'discovery','userCfgdFlags':'0','vdcId':'1'}}}]}

Jul 14, 2019 18:42:31 CDT Task #3 (ACI API Test (Execute Generic API)) completed successfully in 0 seconds
CreatePlease to create content