VMware Cloud Community
hemanagouda
Contributor
Contributor

URLEncoding in query service of vCloud Director API

Hi,

Trying to use below vCloud Director Query Service API:

GET /api​/query​?type=vApp​&filter=%28vdcName%3D%3Dsikdervse%29​&format=records​


Getting below error:

Bad request: Expression %28vdcName%3D%3Dsikdervse%29 is not a comparison expression.


On the other hand I get successfull 200 OK for below call

GET /api/query?type=vApp&filter=(vdcName==sikdervse)&format=records


Only difference is that in first failing GET call, reserved characters like '(', '=', '=' & ')' are URLEncoded or Percent Encoded. Why is VCD throwing error when URLs are encoded using Percent encoding as per W3 standards. How can we make VCD accept encoded URLs?


Using vCloud Director 5.1.


Thanks,

Hemana

email: hemana.gouda@accenture.com



0 Kudos
2 Replies
cfor
Expert
Expert

As I understand it this is a limitation of the query service.  I would suggest opening a case with support as this is the only way these things seem to get resolved.

ChrisF (VCP4, VCP5, VCP-Cloud) - If you find this or any other answer useful please consider awarding points by marking the answer correct or helpful
0 Kudos
rkamal
VMware Employee
VMware Employee

Hi Hemana,

How are you making these API calls.

Are you using the vCloud Java SDK to make it. Do you get this exception when making through the SDK?

Regards,

Rajesh Kamal.

0 Kudos