Get Host Allocation Strategies

GET/zstack/v1/hosts/allocators/strategies

Headers

Authorization: OAuth the-session-uuid

Curl Example

curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth f8e76d7a6ec0461cab685e6bd9d724d2" \
-X GET http://localhost:8080/zstack/v1/hosts/allocators/strategies

Parameter List

NameTypeLocationDescriptionAllowed ValuesStarting Version
systemTags (optional)ListquerySystem tag 0.6
userTags (optional)ListqueryUser tag 0.6

API Response

Response Example

{
  "hostAllocatorStrategies": [
    "b39183b36b8e4cb386bd7bb45c7c1997",
    "e01d613c77a44b65b6bef75b4ef2accb"
  ]
}
NameTypeDescriptionStarting Version
strategiesListStrategies0.6
errorErrorCodeError code. If not null, the operation failed. If null, the operation succeeded. See details error0.6

error

NameTypeDescriptionStarting Version
codeStringError code number, globally unique identifier of the error, e.g. SYS.1000, HOST.10010.6
descriptionStringBrief description of the error0.6
detailsStringDetailed error information0.6
elaborationStringReserved field, default is null0.6
opaqueLinkedHashMapReserved field, default is null0.6
causeErrorCodeRoot cause, the error that caused the current error. If there is no original error, this field is null0.6

SDK Examples

Java SDK

GetHostAllocatorStrategiesAction action = new GetHostAllocatorStrategiesAction();
action.sessionId = "c10fb9fbab4744ecae6686b4193423e8";
GetHostAllocatorStrategiesAction.Result res = action.call();

Python SDK

GetHostAllocatorStrategiesAction action = GetHostAllocatorStrategiesAction()
action.sessionId = "caa6b3db2d5b42f79b44566b10763973"
GetHostAllocatorStrategiesAction.Result res = action.call()