Reviewed-by: gtema <artem.goncharov@gmail.com> Co-authored-by: Yang, Tong <yangtong2@huawei.com> Co-committed-by: Yang, Tong <yangtong2@huawei.com>
22 KiB
Querying Basic Information About a Specified Cluster
Function
This API is used to query basic information about a specified cluster.
URI
GET /web/v1/clusters
Request
Response
- Example:
HTTP/1.1 200 OK Data:Wed,02 May 2018 10:10:01 GMT Server: example-server Content-Type: application/json { "id": 0, "state": "COMPLETE", "error_code": 0, "error_description": "string", "total_progress": 0, "res_obj": { "clusters": [ { "stack": "string", "id": 0, "name": "string", "description": "string", "version": "string", "cluster_state": "string", "stack_model": "string", "lic_state": "string" } ] } }
- Parameter description
Parameter |
Mandatory or Not |
Type |
Description |
---|---|---|---|
id |
No |
LONG |
Asynchronous task ID (meaningless in other scenarios). The default value is -1. |
state |
No |
STRING |
Cluster status. The value FAILED indicates that the command fails to be executed. The value COMPLETE indicates that the command is successfully executed. |
error_code |
No |
INTEGER |
Error code returned |
error_description |
No |
STRING |
Error code description |
total_progress |
No |
FLOAT |
Total progress |
res_obj |
No |
REFERENCE |
Response object |
Parameter |
Mandatory or Not |
Type |
Description |
---|---|---|---|
clusters |
No |
ARRAY_REFERENCE |
Records all installed clusters in arrays. |
Parameter |
Mandatory or Not |
Type |
Description |
---|---|---|---|
stack |
No |
STRING |
Cluster version information |
id |
No |
INTEGER |
Cluster ID |
name |
No |
STRING |
Cluster name |
description |
No |
STRING |
Cluster description |
version |
No |
STRING |
Cluster version |
cluster_state |
No |
STRING |
Cluster status. Possible values are as follows: Null: There is no special status. installingPatch: The patch is being installed. |
stack_model |
No |
STRING |
Security mode of a cluster. Possible values are as follows: NoSec: Normal mode Sec: Security mode |
lic_state |
No |
STRING |
License status |
Status Code
Status Code |
Description |
---|---|
200 |
The operation is successful. |
For details about error status codes, see Status Codes.