List a Cluster on Oracle OCI
- GET /api/v2/clusters/
Use this API to list all clusters.
Parameters
None
Required Role
The following users can make this API call:
Users who belong to the system-user or system-admin group.
Users who belong to a group associated with a role that allows creating a cluster. See Managing Groups and Managing Roles for more information.
Request API Syntax
curl -X GET -H "X-AUTH-TOKEN:$X_AUTH_TOKEN" -H "Content-Type:application/json" -H "Accept: application/json" \
"https://oraclecloud.qubole.com/api/v2/clusters/"
Parameters
Parameter |
Description |
---|---|
page |
Specifies the number of the current page. The default is 1. |
per_page |
Specifies the number of clusters to be retrieved per page. The default is 10. |
Response
The response is an array of hashes. Each hash contains key-value pairs describing attributes of each cluster.
Note
A single call reports a maximum of ten clusters if you let page
and per_page
default (as above). Make the
call iteratively to make sure you get the complete list; see Sample API Request.
Sample API Request
curl -X GET -H "X-AUTH-TOKEN: $AUTH_TOKEN" -H "Content-Type:application/json" -H "Accept: application/json" \
"https://oraclecloud.qubole.com/api/v2/clusters?page=1&per_page=20"
Each response includes:
{"paging_info":{"next_page":<page_no> or null,"previous_page":<page_no> or null ,"per_page":20}
To list all clusters, make the call iteratively, incrementing page
, until next_page
is null.