GetPrimaryStorageUsageReport
API Request
URLs
GET zstack/v1/primary-storage/{primaryStorageUuid}/usage/reportHeaders
Authorization: OAuth the-session-uuidCurl
Sample
curl -H "Content-Type: application/json;charset=UTF-8"
-H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c"
-X GET http://localhost:8080/zstack/v1/primary-storage/902707d77b6e36179ee0117e6614e52f/usage/report?
Request Parameters
| Name | Type | Location | Description | Optional Value | Starting Version |
|---|---|---|---|---|---|
| primaryStorageUuid | String | url | The primary storage UUID. | 4.7.21 | |
| uris | List | query | Optinal. The storage protocol. | 4.7.21 | |
| systemTags | List | query | Optional. The system tags. | 4.7.21 | |
| userTags | List | query | Optional. The user tags. | 4.7.21 |
API Response
Sample
Response
{
"uriUsageForecast": {},
"usageReport": {}
}| Name | Type | Description | Starting Version |
|---|---|---|---|
| success | boolean | 4.7.21 | |
| uriUsageForecast | Map | See uriUsageForecast. | 4.7.21 |
| usageReport | UsageReport | See usageReport | 4.7.21 |
| error | ErrorCode | The error code. If not null, the operation fails, or vice versa. For more information, see error. | 4.7.21 |
#uriUsageForecast
| Name | Type | Description | Starting Version |
|---|---|---|---|
| usedPhysicalCapacitiesForecast | List | 4.7.21 | |
| UsedPhysicalCapacitiesHistory | List | 4.7.21 | |
| TotalPhysicalCapacitiesHistory | List | 4.7.21 | |
| startTime | Long | 4.7.21 | |
| interval | Long | 4.7.21 |
#usageReport
| Name | Type | Description | Starting Version |
|---|---|---|---|
| usedPhysicalCapacitiesForecast | List | 4.7.21 | |
| UsedPhysicalCapacitiesHistory | List | 4.7.21 | |
| TotalPhysicalCapacitiesHistory | List | 4.7.21 | |
| startTime | Long | 4.7.21 | |
| interval | Long | 4.7.21 |
#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. | 4.7.21 |
| description | String | The detailed description of the error. | 4.7.21 |
| details | String | The details about the error. | 4.7.21 |
| elaboration | String | The reserved field. Default value: null. | 4.7.21 |
| opaque | LinkedHashMap | The reserved field. Default value: null. | 4.7.21 |
| cause | ErrorCode | The root error, which is the associated root cause of the current error. If no root error exists, this parameter is null. | 4.7.21 |
SDK Sample
Java
SDK
GetPrimaryStorageLicenseInfoAction action = new GetPrimaryStorageLicenseInfoAction();
action.uuid = "9b624d6e4ca53a4aa10bfc341281d0ef";
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
GetPrimaryStorageLicenseInfoAction.Result res = action.call();Python
SDK
GetPrimaryStorageLicenseInfoAction action = GetPrimaryStorageLicenseInfoAction()
action.uuid = "9b624d6e4ca53a4aa10bfc341281d0ef"
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
GetPrimaryStorageLicenseInfoAction.Result res = action.call()