Move Account Group

PUT/zstack/v1/account-groups/{uuid}/actions

Headers

Authorization: OAuth the-session-uuid

Body

{
  "moveAccountGroup": {
    "parentUuid": "996c8a1d6f273903b750254a69ec5a7b"
  },
  "systemTags": [],
  "userTags": []
}

In the example above, the systemTags and userTags fields are optional. They are listed to indicate that these two fields can be included in the body.

Curl Example

curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \
-X PUT -d '{"moveAccountGroup":{"parentUuid":"996c8a1d6f273903b750254a69ec5a7b"}}' \
http://localhost:8080/zstack/v1/account-groups/efdbcd5b10ee3b9aa6b61f2ec4a0efcb/actions

Parameter List

NameTypeLocationDescriptionAllowed ValuesStarting Version
uuidStringurlAccount group UUID 4.10.0
parentUuid (Optional)Stringbody (contained in the moveAccountGroup structure)Parent account group UUID 4.10.0
systemTags (Optional)ListbodySystem tags 4.10.0
userTags (Optional)ListbodyUser tags 4.10.0

API Response

Response example

{
  "inventory": {
    "uuid": "c4f2348db99a4d64ac5319abecff4427",
    "name": "my-group",
    "description": "my-group-description",
    "rootGroupUuid": "c4f2348db99a4d64ac5319abecff4427",
    "createDate": "Nov 14, 2017 2:20:57 PM",
    "lastOpDate": "Nov 14, 2017 2:20:57 PM"
  }
}
NameTypeDescriptionStarting Version
successbooleanWhether the request is successful4.10.0
errorErrorCodeError code. If not null, the operation failed. This field is null on success. For details, see error4.10.0

error

NameTypeDescriptionStarting Version
codeStringThe error code number. A globally unique identifier for the error, e.g., SYS.1000, HOST.10010.6
descriptionStringA brief description of the error0.6
detailsStringDetailed information about the error0.6
elaborationStringReserved field. Default is null0.6
opaqueLinkedHashMapReserved field. Default is null0.6
causeErrorCodeThe root error that caused the current error. This field is null if there is no root cause0.6

SDK Examples

Java SDK

MoveAccountGroupAction action = new MoveAccountGroupAction();
action.uuid = "efdbcd5b10ee3b9aa6b61f2ec4a0efcb";
action.parentUuid = "996c8a1d6f273903b750254a69ec5a7b";
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
MoveAccountGroupAction.Result res = action.call();

Python SDK

MoveAccountGroupAction action = MoveAccountGroupAction()
action.uuid = "efdbcd5b10ee3b9aa6b61f2ec4a0efcb"
action.parentUuid = "996c8a1d6f273903b750254a69ec5a7b"
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
MoveAccountGroupAction.Result res = action.call()