Hi,
I am not able to find query that will return me a list of expired vApps. I see that there is result set for vApp templates which have isExpired field, but this field is missing for vApp result set. Does anyone know how to achieve this so I do not need to query vApps by one?
Thanks,
Tomas
The storage lease information is available only in the LeaseSettingsSection (aka LeaseSettingsSectionType), which I don't think is queryable using the query service.
The only place where I see a query that might work is the adminVApp query which has an autoDeleteDate attribute that appears to be the ISO 8601 timestamp when the (storage) lease expires or expired. Although I can't get it work in a filter expression because there's no date comparison operators, so you'd have to know the specific value to match on...
I am out of the office 3/12 through 3/16. For urgent issues, please contact the Service Desk.
Thank you,
Jeff
The storage lease information is available only in the LeaseSettingsSection (aka LeaseSettingsSectionType), which I don't think is queryable using the query service.
The only place where I see a query that might work is the adminVApp query which has an autoDeleteDate attribute that appears to be the ISO 8601 timestamp when the (storage) lease expires or expired. Although I can't get it work in a filter expression because there's no date comparison operators, so you'd have to know the specific value to match on...
Thanks for help. It is really helpful. XSD definition is missing these attributes so I did not see it. Here are others that are comming over the wire and is not defined.
Thanks again
Tomas
Next version of vCD will have a searchable 'isExpired' field in vApp query.
Now I see that I was probably too optimistic with that result.
I am able to get autoDeleteDate and autoUndeployDate values, but both expired and stopped (but not expired) vApps have autoDeleteDate set to some value and autoUndeployDate unset so I am not able to distinguish them from each other.
Does anybody know any workaround how to get by bulk query a list of expired vApps with current version of vCloud API?
You could do a query for tasks with the name jobUndeploy and ObjectType vapp. You could probably filter it further if you know the UUID of 'system', which is going to be the undeployer.
Something like this?
GET https://VCDSERVER/api/query?type=adminTask&format=idrecords&filter=name==jobUndeploy;objectType==vap...
You could filter it by day if you wanted to, do checks to see if the vApp in question is still undeployed, etc.