GetPrimaryStorageTypes
API Request
URLs
GET zstack/v1/primary-storage/typesHeaders
Authorization: OAuth the-session-uuidCurl
Sample
curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth 4b39cdd6eaea4476bf9d93d42ddc4186" \
-X GET http://localhost:8080/zstack/v1/primary-storage/typesRequest Parameters
| Name | Type | Location | Description | Optional Value | Starting Version |
|---|---|---|---|---|---|
| systemTags | List | query | Optional. The system tags. | 0.6 | |
| userTags | List | query | Optional. The user tags. | 0.6 |
API Response
Sample
Response
{
"primaryStorageTypes": [
"LocalStorage",
"NFS",
"SharedMountPoint",
"Ceph"
]
}| Name | Type | Description | Starting Version |
|---|---|---|---|
| types | List | 0.6 | |
| error | ErrorCode | The error code. If not null, the operation fails, or vice versa. For more information, see error. | 0.6 |
#error
| Name | Type | Description | Starting Version |
|---|---|---|---|
| code | String | The error code, which is a numbered or alphanumeric code that specifies an error. For example, SYS.1000, HOST.1001. | 0.6 |
| description | String | The detailed description of the error. | 0.6 |
| details | String | The details about the error. | 0.6 |
| elaboration | String | The reserved field. Default value: null. | 0.6 |
| opaque | LinkedHashMap | The reserved field. Default value: null. | 0.6 |
| cause | ErrorCode | The root error, which is the associated root cause of the current error. If no root error exists, this parameter is null. | 0.6 |
SDK Sample
Java
SDK
GetPrimaryStorageTypesAction action = new GetPrimaryStorageTypesAction();
action.sessionId = "1dccf587f1de4aa998b73bb0b85c3eae";
GetPrimaryStorageTypesAction.Result res = action.call();Python
SDK
GetPrimaryStorageTypesAction action = GetPrimaryStorageTypesAction()
action.sessionId = "0090252c9cf641cc90bd1a3d93dfd6b6"
GetPrimaryStorageTypesAction.Result res = action.call()