The method storage_component/get_capacity retrieves capacity information for storage components, and if available the total capacity of the system.
HTTP request syntax (URI)
POST https://host_ip:9099/mapi/v1/storage_component/get_capacity
Request structure
Not applicable.
Response structure
The response body is:
[ { "storageCapacities": { "uuid": { "availableBytes": nnnnn, "totalBytes": nnnnn, "usedBytes": nnnnn, "warnThreshold": nnnnn }, . . . "aggregate": { "availableBytes": nnnnn, "totalBytes": nnnnn, "usedBytes": nnnnn, "warnThreshold": nnnnn } } } ]
Parameter |
Type |
Description |
---|---|---|
id | UUID | The ID of the storage component. |
availableBytes | 64-bit integer | The available capacity of the storage component in bytes. A returned value of -1 means that the value is not available. |
totalBytes | 64-bit integer | The total capacity of the storage component in bytes. A returned value of -1 means that the value is not available. |
usedBytes | 64-bit integer | The used capacity of the storage component in bytes. A returned value of -1 means that the value is not available. |
warnThreshold | 64-bit integer | The threshold for a capacity warning, as compared with the value availableBytes. A returned value of -1 means that the value is not available. |
Return codes
Status code |
HTTP name |
Description |
---|---|---|
200 | OK | The request was executed successfully. |
Example
Request example:
POST https://10.10.24.195:9099/mapi/v1/storage_component/get_capacity
JSON response:
[ { "storageCapacities": { "494bc750-5f7e-42f3-af7d-64f1024ce2e6": { "availableBytes": 1647056204595200, "totalBytes": 1993620471152640, "usedBytes": 346564266557440, "warnThreshold": 598086141345792 }, "1954051f-fa79-4e69-bec3-c933bc7dde2a": { "availableBytes": -1, "totalBytes": -1, "usedBytes": -1, "warnThreshold": -1 }, "aggregate": { "availableBytes": -1, "totalBytes": -1, "usedBytes": -1, "warnThreshold": -1 } } } ]