Product SiteDocumentation Site

2.2. List Data Center Collection

Red Hat Enteprise 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 2.2. List data center collection
GET /rhevm-api/datacenters HTTP/1.1
Accept: application/xml
The API returns the following representation:
HTTP/1.1 200 OK
Content-Type: application/xml

<data_centers>
    <data_center id="01a45ff0-915a-11e0-8b87-5254004ac988"
      href="/rhevm-api/datacenters/01a45ff0-915a-11e0-8b87-5254004ac988">
        <name>Default</name>
        <description>The default Data Center</description>
        <link rel="storagedomains"
          href="/rhevm-api/datacenters/01a45ff0-915a-11e0-8b87-5254004ac988/
          storagedomains"/>
        <link rel="permissions"
          href="/rhevm-api/datacenters/01a45ff0-915a-11e0-8b87-5254004ac988/permissions"/>
        <storage_type>nfs</storage_type>
        <storage_format>v1</storage_format>
        <version minor="0" major="3"/>
        <supported_versions>
            <version minor="0" major="3"/>
        </supported_versions>
        <status>UP</status>
    </data_center>
</data_centers>

Note the id code of your Default data center. This code indentifies this data center in relation to other resources of your virtual environment.