List Clusters

GET /api/v2.2/clusters/

View the configuration details of all clusters in the account.

Required Role

The following roles can make this API call:

  • A user who is part of the system-user/system-admin group.

  • A user invoking this API must be part of a group associated with a role that allows viewing all clusters. See Managing Groups and Managing Roles for more information.

Parameters

Note

Parameters marked in bold below are mandatory. Others are optional and have default values.

Parameter

Description

page

Use this parameter to specify the page number that contains the clusters’ history. Its default value is 1.

per_page

Use this parameter to specify the number of clusters to be retrieved per page. Its default value is 10. When its value is out of bound, the Page number: >page> is out of bounds. error is displayed.

Response

The response is an array of hashes. Each hash contains key-value pairs describing various attributes of a cluster.

Example

Sample 1: Listing all the clusters in the account.

curl -X GET -H "X-AUTH-TOKEN: $AUTH_TOKEN"
-H "Content-Type:application/json" -H "Accept: application/json"
"https://api.qubole.com/api/v2.2/clusters"

Note

The above syntax uses https://api.qubole.com as the endpoint. Qubole provides other endpoints to access QDS that are described in Supported Qubole Endpoints on Different Cloud Providers.

Sample 2: Listing clusters using the page parameter.

curl -X GET -H "X-AUTH-TOKEN: $AUTH_TOKEN" \
-H "Content-Type:application/json" -H "Accept: application/json" \
"https://api.qubole.com/api/2.2/clusters?page=2"

Sample 3: Listing clusters using the per_page parameter.

curl -X GET -H "X-AUTH-TOKEN: $AUTH_TOKEN" \
-H "Content-Type:application/json" -H "Accept: application/json" \
"https://api.qubole.com/api/v2.2/clusters?per_page=3"

Note

The above syntax uses https://api.qubole.com as the endpoint. Qubole provides other endpoints to access QDS that are described in Supported Qubole Endpoints on Different Cloud Providers.