VMware {code} Community
DanielLynnHdC
Contributor
Contributor

vCloud API vApp oversight?

I'm a little lost on this. I'm trying to get a list of vApps in an organization. I assumed it would be in one of the vDCs, but it doesn't show them there and I also looked in the org object and the catalogs. I also tried to access one directly. In vCloud UI the URL is so I assumed that my URI would be , but I get a "resource not found" error. I've also tried /api/v0.9/vapp/143 with no luck.

Lastly, I've looked through the documentation and the "browsing" section seems to work down through org, vdc, catalog, then abruptly stops at the part where it would say "Do this to get a list of vApps, then this to view that vApp".

Thanks for any help you can provide. I'm a bit baffled.

0 Kudos
3 Replies
admin
Immortal
Immortal

The API URIs are not the same as what is displayed in the user interface.

If you do a GET on a vdc-uri the ResourceEntities section of the response has a list of vApps and media available in the VDC.

0 Kudos
DanielLynnHdC
Contributor
Contributor

I've pasted below what my <ResourceEntities> element looks like. I only see vAppTemplates in there and if I look in the UI, there are 6 instantiated vApps for that vDC. Also, if I go to one of the links for a vapptemplate, I get the same resource not found error. the media, on the other hand, does list properly.

<ResourceEntities>

<ResourceEntity type="application/vnd.vmware.vcloud.vAppTemplate+xml" name="myApp" href="http://X.X.X.X/api/v0.9/vAppTemplate/vappTemplate-148"/>

<ResourceEntity type="application/vnd.vmware.vcloud.vAppTemplate+xml" name="ft40" href="http://X.X.X.X/api/v0.9/vAppTemplate/vappTemplate-144"/>

<ResourceEntity type="application/vnd.vmware.vcloud.vAppTemplate+xml" name="myTemplate" href="http://X.X.X.X/api/v0.9/vAppTemplate/vappTemplate-28"/>

<ResourceEntity type="application/vnd.vmware.vcloud.vAppTemplate+xml" name="vApp_Matt" href="http://X.X.X.X/api/v0.9/vAppTemplate/vappTemplate-67"/>

<ResourceEntity type="application/vnd.vmware.vcloud.vAppTemplate+xml" name="Win2k8R2" href="http://X.X.X.X/api/v0.9/vAppTemplate/vappTemplate-108"/>

<ResourceEntity type="application/vnd.vmware.vcloud.vAppTemplate+xml" name="waynetest-OVF" href="http://X.X.X.X/api/v0.9/vAppTemplate/vappTemplate-150"/>

<ResourceEntity type="application/vnd.vmware.vcloud.media+xml" name="Windows Server 2008 R2" href="http://X.X.X.X/api/v0.9/media/2"/>

</ResourceEntities>

0 Kudos
DanielLynnHdC
Contributor
Contributor

I was able to make some progress on this by coincidence. Those vApps were created when logged in as the vCloud administrator user. I can see them as administrator, but not as the org administrator. Is this intentional? It seems like the org administrator should be able to see anything in the org.

0 Kudos