VCDにおいては、オブジェクト毎のAPIを叩くことなく、queryにて一様にオブジェクト情報を取得できる。
例1:VCD上の全VMを一覧表示させる(システム管理者にて実行)
GET https://172.16.21.20/api/query?type=adminVM 出力(抜粋) <AdminVMRecord name="vm01" containerName="vApp01" vappScopedLocalId="b052780d-9f0f-4658-a2c5-51541c5a6e78" container="https://172.16.21.20/api/vApp/vapp-41b1f6dd-1124-4be8-9153-01037b989b9f" status="POWERED_OFF" vdcName="21-ovdc01" vdc="https://172.16.21.20/api/vdc/ddff3d5a-76ec-4044-8fbb-c2ea0a9e5c1c" hostName="21-esxi-02.env.lab" isVAppTemplate="false" isDeleted="false" guestOs="CentOS 8 (64-bit)" numberOfCpus="1" memoryMB="1024" isDeployed="false" isPublished="false" isVdcEnabled="true" hardwareVersion="19" vmToolsVersion="0" datastoreName="Share" vc="https://172.16.21.20/api/admin/extension/vimServer/30381396-7dee-4c98-88b6-417abc4d21e0" moref="vm-3006" org="https://172.16.21.20/api/org/3aeed6dd-20bf-444c-a875-2483933e89cf" storageProfileName="vcd" gcStatus="GC_PENDING" isAutoNature="false" isComputePolicyCompliant="true" vmSizingPolicyId="e3cdae4b-3d50-4656-850d-807ddfc69cf8" encrypted="false" dateCreated="2023-04-26T09:51:11.895Z" isExpired="true" vmNameInVc="vm01-oN3J" hasVgpuPolicy="false" firmware="bios" tpmPresent="false" replicationState="NONE" href="https://172.16.21.20/api/vApp/vm-c8267452-1f17-4b3e-ae0a-5d2b230d54eb" containerStatus="RESOLVED" pvdcHighestSupportedHardwareVersion="19"/> <AdminVMRecord name="vm01" containerName="vApp03" description=" " vappScopedLocalId="390e8a4c-7e99-4ee1-9e55-c955d1693cdc" container="https://172.16.21.20/api/vApp/vapp-a200ad63-51a7-4380-8a7f-f0587a9d2e40" status="POWERED_OFF" vdcName="21-ovdc01" vdc="https://172.16.21.20/api/vdc/ddff3d5a-76ec-4044-8fbb-c2ea0a9e5c1c" hostName="21-esxi-03.env.lab" isVAppTemplate="false" isDeleted="false" guestOs="CentOS 8 (64-bit)" numberOfCpus="1" memoryMB="1024" networkName="route01" isDeployed="false" isPublished="false" isVdcEnabled="true" hardwareVersion="19" vmToolsVersion="0" datastoreName="Share" vc="https://172.16.21.20/api/admin/extension/vimServer/30381396-7dee-4c98-88b6-417abc4d21e0" moref="vm-5035" org="https://172.16.21.20/api/org/3aeed6dd-20bf-444c-a875-2483933e89cf" storageProfileName="vcd" gcStatus="GC_PENDING" isAutoNature="false" isComputePolicyCompliant="true" vmSizingPolicyId="e3cdae4b-3d50-4656-850d-807ddfc69cf8" ipAddress="172.16.121.2" encrypted="false" dateCreated="2023-06-20T10:45:00.699Z" isExpired="false" vmNameInVc="vm01-4hFH" hasVgpuPolicy="false" firmware="bios" tpmPresent="false" replicationState="NONE" href="https://172.16.21.20/api/vApp/vm-db8ca323-544d-439b-a030-6a5038120082" containerStatus="RESOLVED" pvdcHighestSupportedHardwareVersion="19"/>
例2:NSX-Tを表示させる(システム管理者にて実行)
GET https://172.16.21.20/api/query?type=nsxTManager 出力(抜粋) <NsxTManagerRecord name="21-nsxmgr.env.lab" url="https://21-nsxmgr.env.lab" version="3.1.1.0.0.17483185" globalManager="false" href="https://172.16.21.20/api/admin/extension/nsxtManagers/555741dc-f3a6-4272-866a-2325c0b99be9"/>
・queryの一覧を取得する
GET https://172.16.21.20/api/query 出力(抜粋) <Link rel="down" href="https://172.16.21.20/api/query?type=adminOrgVdc&format=references" type="application/vnd.vmware.vcloud.query.references+xml" name="adminOrgVdc"/> <Link rel="down" href="https://172.16.21.20/api/query?type=providerVdc&format=references" type="application/vnd.vmware.vcloud.query.references+xml" name="providerVdc"/> <Link rel="down" href="https://172.16.21.20/api/query?type=user&format=references" type="application/vnd.vmware.vcloud.query.references+xml" name="user"/> <Link rel="down" href="https://172.16.21.20/api/query?type=adminVM&format=references" type="application/vnd.vmware.vcloud.query.references+xml" name="adminVM"/> <Link rel="down" href="https://172.16.21.20/api/query?type=nsxTManager&format=references" type="application/vnd.vmware.vcloud.query.references+xml" name="nsxTManager"/>
出力から作成したtypeの一覧
https://172.16.21.20/api/query?type=licensingReport https://172.16.21.20/api/query?type=licensingReportSample https://172.16.21.20/api/query?type=licensingManagedServer https://172.16.21.20/api/query?type=licensingVirtualMachine https://172.16.21.20/api/query?type=organization https://172.16.21.20/api/query?type=orgVdc https://172.16.21.20/api/query?type=media https://172.16.21.20/api/query?type=vAppTemplate https://172.16.21.20/api/query?type=vApp https://172.16.21.20/api/query?type=vm https://172.16.21.20/api/query?type=orgNetwork https://172.16.21.20/api/query?type=vAppNetwork https://172.16.21.20/api/query?type=catalog https://172.16.21.20/api/query?type=adminOrgVdc https://172.16.21.20/api/query?type=providerVdc https://172.16.21.20/api/query?type=externalNetwork https://172.16.21.20/api/query?type=group https://172.16.21.20/api/query?type=user https://172.16.21.20/api/query?type=strandedUser https://172.16.21.20/api/query?type=role https://172.16.21.20/api/query?type=event https://172.16.21.20/api/query?type=resourcePool https://172.16.21.20/api/query?type=datastore https://172.16.21.20/api/query?type=networkPool https://172.16.21.20/api/query?type=portgroup https://172.16.21.20/api/query?type=dvSwitch https://172.16.21.20/api/query?type=cell https://172.16.21.20/api/query?type=virtualCenter https://172.16.21.20/api/query?type=host https://172.16.21.20/api/query?type=adminVApp https://172.16.21.20/api/query?type=right https://172.16.21.20/api/query?type=adminVM https://172.16.21.20/api/query?type=orgVdcResourcePoolRelation https://172.16.21.20/api/query?type=providerVdcResourcePoolRelation https://172.16.21.20/api/query?type=datastoreProviderVdcRelation https://172.16.21.20/api/query?type=adminUser https://172.16.21.20/api/query?type=adminGroup https://172.16.21.20/api/query?type=adminVAppNetwork https://172.16.21.20/api/query?type=adminCatalog https://172.16.21.20/api/query?type=adminCatalogItem https://172.16.21.20/api/query?type=catalogItem https://172.16.21.20/api/query?type=adminMedia https://172.16.21.20/api/query?type=adminVAppTemplate https://172.16.21.20/api/query?type=adminShadowVM https://172.16.21.20/api/query?type=task https://172.16.21.20/api/query?type=adminTask https://172.16.21.20/api/query?type=blockingTask https://172.16.21.20/api/query?type=disk https://172.16.21.20/api/query?type=vmDiskRelation https://172.16.21.20/api/query?type=adminDisk https://172.16.21.20/api/query?type=adminVMDiskRelation https://172.16.21.20/api/query?type=condition https://172.16.21.20/api/query?type=adminEventCBM https://172.16.21.20/api/query?type=adminEvent https://172.16.21.20/api/query?type=strandedItem https://172.16.21.20/api/query?type=adminService https://172.16.21.20/api/query?type=service https://172.16.21.20/api/query?type=serviceLink https://172.16.21.20/api/query?type=storageProfile https://172.16.21.20/api/query?type=orgVdcStorageProfile https://172.16.21.20/api/query?type=adminOrgVdcStorageProfile https://172.16.21.20/api/query?type=providerVdcStorageProfile https://172.16.21.20/api/query?type=apiFilter https://172.16.21.20/api/query?type=adminApiDefinition https://172.16.21.20/api/query?type=apiDefinition https://172.16.21.20/api/query?type=adminFileDescriptor https://172.16.21.20/api/query?type=fileDescriptor https://172.16.21.20/api/query?type=resourceClassAction https://172.16.21.20/api/query?type=aclRule https://172.16.21.20/api/query?type=resourceClass https://172.16.21.20/api/query?type=serviceResource https://172.16.21.20/api/query?type=edgeGateway https://172.16.21.20/api/query?type=orgVdcNetwork https://172.16.21.20/api/query?type=vAppOrgVdcNetworkRelation https://172.16.21.20/api/query?type=externalLocalization https://172.16.21.20/api/query?type=resourcePoolVmList https://172.16.21.20/api/query?type=vmGroupVms https://172.16.21.20/api/query?type=vmGroups https://172.16.21.20/api/query?type=adminRole https://172.16.21.20/api/query?type=nsxTManager https://172.16.21.20/api/query?type=adminOrgVdcTemplate https://172.16.21.20/api/query?type=orgVdcTemplate https://172.16.21.20/api/query?type=siteOrgAssociation https://172.16.21.20/api/query?type=gatewayUplinks https://172.16.21.20/api/query?type=site https://172.16.21.20/api/query?type=siteAssociation https://172.16.21.20/api/query?type=orgAssociation