[POST] .../v1/usergroup/edit
Edits group user. Use this method to rename a user group or move it to another parent in the group tree. The method validates id, rejects parent_id equal to id, validates optional name length, checks user-group edit permission 7, updates the group through the persistent layer and returns row_affected. The request body is required, id must be positive, name may be omitted to leave it unchanged and parent_id may be null to leave the current parent unchanged. Missing body, invalid id, parent_id == id, too long name, denied permission, hierarchy conflicts and database errors are returned as HTTP 200 ErrorResult business errors.
Request Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| id | Int64 | Required | Group ID. |
| name | String | Optional | Group name. |
| parent_id | Int64 | Optional | Parent group ID. Default is 0. |
Request Example
{
"id": 3,
"parent_id": 0,
"name": "Store managers"
}
Response Parameters
| Name | Type | Description |
|---|---|---|
| ok | Boolean | Indicates whether the request completed successfully. |
| result | Update | Update operation result. |
Response Example
{
"ok": true,
"result": {
"row_affected": 1,
"ids": []
}
}