Get Directory Usage Information

GET/zstack/v1/software-package/directory/usage

Headers

Authorization: OAuth the-session-uuid

Curl Example

curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \
-X GET http://localhost:8080/zstack/v1/software-package/directory/usage?managementNodeUuid=ff000842a4673ab39dad7a3990df5300&directoryPath=/root/installPath/file

Parameter List

NameTypeLocationDescriptionAllowed ValuesStarting Version
managementNodeUuidStringqueryManagement Node UUID 4.10.20
directoryPathStringqueryDirectory absolute path 4.10.20
systemTags (Optional)ListquerySystem Tag 4.10.20
userTags (Optional)ListqueryUser Tag 4.10.20

API Response

Response Example

{
  "totalCapacity": 1024,
  "availableCapacity": 512
}
NameTypeDescriptionStarting Version
totalCapacitylongTotal capacity4.10.20
availableCapacitylongAvailable capacity4.10.20
successbooleanReturns true if the operation was successful, otherwise false4.10.20
errorErrorCodeFor details, see error4.10.20

error

NameTypeDescriptionStarting Version
codeStringError code number, globally unique identifier of the error, for example SYS.1000, HOST.10010.6
descriptionStringBrief summary of the error0.6
detailsStringDetailed error information0.6
elaborationStringReserved field, defaults to null0.6
opaqueLinkedHashMapReserved field, defaults to null0.6
causeErrorCodeRoot cause: the source error that triggered the current error. If there is no original error, this field is null0.6

SDK Examples

Java SDK

GetDirectoryUsageAction action = new GetDirectoryUsageAction();
action.managementNodeUuid = "ff000842a4673ab39dad7a3990df5300";
action.directoryPath = "/root/installPath/file";
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
GetDirectoryUsageAction.Result res = action.call();

Python SDK

action = GetDirectoryUsageAction()
action.managementNodeUuid = "ff000842a4673ab39dad7a3990df5300"
action.directoryPath = "/root/installPath/file"
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
res = action.call()