VMware Cloud Community
jarhorn
Contributor
Contributor
Jump to solution

How can I use query api / vcloud api to filter AdminVAppTemplate Records by ID?

I have tried the following REST calls:


here I was trying to use the href of the vAppTemplate:

https://vcd.ddev/api/query?type=adminVAppTemplate&filter=href==https://vcd.ddev/api/vapptemplate-ed8...

this returned "com.vmware.vcloud.api.rest.parser.QueryParseException: Bad request: Unknown property name href"

here I was trying to use the ID of the vAppTemplate (preferred method):
https://vcd.ddev/api/query?type=adminVAppTemplate&filter=id==urn:vcloud:vapptemplate:ed8aa4df-64be-4...

https://vcd.ddev/api/query?type=adminVAppTemplate&filter=id==ed8aa4df-64be-454a-9acc-48ad25248092

both returned "com.vmware.vcloud.api.rest.parser.QueryParseException: Bad request: Unknown property name id"

here I was filtering by the parent Organization (WORKS)
https://vcd.ddev/api/query?type=adminVAppTemplate&filter=org==0913b09e-7f78-4de0-87cd-99f6cbf3227a

Any thoughts about how I can filter by ID?  or even href?

0 Kudos
1 Solution

Accepted Solutions
lamw
Community Manager
Community Manager
Jump to solution

Hi jarhorn,

Currently the Query Service does not support filtering based on href or id property, but you can use the Entity Resolver to help you since you already know the ID property. Take a look at this article for the details - http://blogs.vmware.com/vsphere/2012/05/entity-resolver-in-the-vcloud-api.html

FYI - We're aware of this limitation today with the Query Service and it will be fixed.

Thanks

View solution in original post

0 Kudos
3 Replies
lamw
Community Manager
Community Manager
Jump to solution

Hi jarhorn,

Currently the Query Service does not support filtering based on href or id property, but you can use the Entity Resolver to help you since you already know the ID property. Take a look at this article for the details - http://blogs.vmware.com/vsphere/2012/05/entity-resolver-in-the-vcloud-api.html

FYI - We're aware of this limitation today with the Query Service and it will be fixed.

Thanks

0 Kudos
jarhorn
Contributor
Contributor
Jump to solution

sounds good, thanks!

0 Kudos
denovojeff
Contributor
Contributor
Jump to solution

I am out of the office 7/3/12 - 7/4/12. I will have limited access to email. For urgent issues, please contact Jeff Wilson (jwilson@denovo-us.com).

0 Kudos