Show Table of Contents
3.2. Example: List Data Center Collection
Red Hat Enterprise Virtualization Manager creates a
Default data center on installation. This example uses the Default data center as the basis for our virtual environment.
The following request retrieves a representation of the data center collection:
Example 3.2. List data center collection
Request:
GET /api/datacenters HTTP/1.1 Accept: application/xml
cURL command:
# curl -X GET -H "Accept: application/xml" -u [USER:PASS] \
--cacert [CERT] \
https://[RHEVM Host]:443/api/datacenters
Result:
HTTP/1.1 200 OK
Content-Type: application/xml
<data_centers>
<data_center href="/api/datacenters/00000002-0002-0002-0002-0000000003ab" id="00000002-0002-0002-0002-0000000003ab">
<name>Default</name>
<description>The default Data Center</description>
<link rel="storagedomains"/>
href="/api/datacenters/00000002-0002-0002-0002-0000000003ab/storagedomains"
<link rel="clusters"/>
href="/api/datacenters/00000002-0002-0002-0002-0000000003ab/clusters"
<link rel="networks"/>
href="/api/datacenters/00000002-0002-0002-0002-0000000003ab/networks"
<link rel="permissions"/>
href="/api/datacenters/00000002-0002-0002-0002-0000000003ab/permissions"
<link rel="quotas"/>
href="/api/datacenters/00000002-0002-0002-0002-0000000003ab/quotas"
<link rel="iscsibonds"/>
href="/api/datacenters/00000002-0002-0002-0002-0000000003ab/iscsibonds"
<link rel="qoss"/>
href="/api/datacenters/00000002-0002-0002-0002-0000000003ab/qoss"
<local>false</local>
<storage_format>v3</storage_format>
<version major="3" minor="5"/>
<supported_versions>
<version major="3" minor="5"/>
</supported_versions>
<status>
<state>up</state>
</status>
</data_center>
</data_centers>
Note the
id code of your Default data center. This code identifies this data center in relation to other resources of your virtual environment.
The data center also contains a link to the
storagedomains sub-collection. The data center uses this sub-collection to attach storage domains from the storagedomains main collection, which this example covers later.

Where did the comment section go?
Red Hat's documentation publication system recently went through an upgrade to enable speedier, more mobile-friendly content. We decided to re-evaluate our commenting platform to ensure that it meets your expectations and serves as an optimal feedback mechanism. During this redesign, we invite your input on providing feedback on Red Hat documentation via the discussion platform.