Red Hat Training

A Red Hat training course is available for Red Hat Gluster Storage

3.2. Example: List Cluster Collection

Red Hat Storage Console creates a Default cluster on installation. This example uses the Default cluster to group resources in your Red Hat Storage environment.
The following request retrieves a representation of the cluster collection:

Example 3.2. List clusters collection

GET /api/clusters HTTP/1.1
Accept: application/xml
cURL command:
curl -X GET -H "Accept: application/xml" -u [USER:PASS] --cacert [CERT] https://[RHSC Host]/api/clusters
The API returns the following representation:
HTTP/1.1 200 OK
Content-Type: application/xml

<clusters>
    <cluster href="/api/clusters/99408929-82cf-4dc7-a532-9d998063fa95" id="99408929-82cf-4dc7-a532-9d998063fa95">
        <name>Default</name>
        <description>The default server cluster</description>
        <link href="/api/clusters/99408929-82cf-4dc7-a532-9d998063fa95/networks" rel="networks"/>
        <link href="/api/clusters/99408929-82cf-4dc7-a532-9d998063fa95/permissions" rel="permissions"/>
        <link href="/api/clusters/99408929-82cf-4dc7-a532-9d998063fa95/glustervolumes" rel="glustervolumes"/>
        <link href="/api/clusters/99408929-82cf-4dc7-a532-9d998063fa95/glusterhooks" rel="glusterhooks"/>
        <data_center href="/api/datacenters/5849b030-626e-47cb-ad90-3ce782d831b3" id="5849b030-626e-47cb-ad90-3ce782d831b3"/>
        <memory_policy>
            <overcommit percent="100"/>
            <transparent_hugepages>
                <enabled>true</enabled>
            </transparent_hugepages>
        </memory_policy>
        <scheduling_policy>
            <policy>none</policy>
        </scheduling_policy>
        <version major="3" minor="3"/>
        <error_handling>
            <on_error>migrate</on_error>
        </error_handling>
        <virt_service>false</virt_service>
        <gluster_service>true</gluster_service>
        <threads_as_cores>false</threads_as_cores>
        <tunnel_migration>false</tunnel_migration>
        <trusted_service>false</trusted_service>
        <ballooning_enabled>false</ballooning_enabled>
    </cluster>
</clusters>
Note the id code of your Default cluster. This code identifies this cluster in relation to other resources of your storage environment.
22632%2C+Console+Developer+Guide-322-09-2014+17%3A11%3A35Report a bug