GetPrimaryStorageTypes
API Request
URLs
GET zstack/v1/primary-storage/typesHeaders
Authorization: OAuth the-session-uuidCurl Example
curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth 4b39cdd6eaea4476bf9d93d42ddc4186" \
-X GET http://localhost:8080/zstack/v1/primary-storage/typesParameter List
| Name | Type | Location | Description | Allowed Values | Starting Version |
|---|---|---|---|---|---|
| systemTags (Optional) | List | query | System Tags | 0.6 | |
| userTags (Optional) | List | query | User Tags | 0.6 |
API Response
Response Example
{
"primaryStorageTypes": [
"LocalStorage",
"NFS",
"SharedMountPoint",
"Ceph"
]
}| Name | Type | Description | Starting Version |
|---|---|---|---|
| types | List | The types. | 0.6 |
| error | ErrorCode | Error code. If not null, the operation failed. When the operation succeeds, this field is null. See error | 0.6 |
#error
| Name | Type | Description | Starting Version |
|---|---|---|---|
| code | String | Error code number, a globally unique identifier for the error, for example SYS.1000, HOST.1001 | 0.6 |
| description | String | Brief description of the error | 0.6 |
| details | String | Detailed error information | 0.6 |
| elaboration | String | Reserved field, defaults to null | 0.6 |
| opaque | LinkedHashMap | Reserved field, defaults to null | 0.6 |
| cause | ErrorCode | Root cause, the source error that caused the current error. If there is no original error, this field is null | 0.6 |
SDK Examples
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()