[comment]: # translation:outdated

[comment]: # ({9d4a1084-9d4a1084})
# usergroup.update

[comment]: # ({/9d4a1084-9d4a1084})

[comment]: # ({4f202118-9fdfde6c})
### 説明

`object usergroup.update(object/array userGroups)`

このメソッドでは既存のユーザーグループを更新できます。

::: noteclassic
このメソッドは*Super admin*ユーザータイプでのみ使用できます。 メソッドを呼び出す権限は、ユーザーロール設定で取り消すことができます。 詳細については[ユーザーの役割](/manual/web_interface/frontend_sections/administration/user_roles)を参照してください。
:::

[comment]: # ({/4f202118-9fdfde6c})

[comment]: # ({9dedd285-93a5d635})
### パラメータ

`(object/array)` 更新するユーザーグループのプロパティ

`usrgrpid`プロパティは、ユーザーグループごとに定義する必要があります。すべてのプロパティはオプションです。 渡されたプロパティのみが更新され、他のプロパティは変更されません。

このメソッドは[標準ユーザーグループプロパティ](object#user_group)に加えて次のパラメーターを受け入れます。

|パラメータ|[タイプ](/manual/api/reference_commentary#data_types)|説明|
|--|--|------|
|rights|object/array|ユーザーグループに割り当てられている現在の[権限](/manual/api/reference/usergroup/object#permission)を置き換えます|
|tag\_filters|array|[タグベースの権限](/manual/api/reference/usergroup/object#tag_based_permission)をグループに割り当てます|
|users|object/array|[Users](/manual/api/reference/user/create)を使用して、ユーザーグループにユーザーを追加します。<br><br>ユーザーには、`userid`プロパティを定義する必要があります|

[comment]: # ({/9dedd285-93a5d635})

[comment]: # ({c04afd7f-c04afd7f})
### 戻り値

`(object)` `usrgrpids`プロパティの下で更新されたユーザーグループのIDを含むオブジェクトを返します。

[comment]: # ({/c04afd7f-c04afd7f})

[comment]: # ({b41637d2-b41637d2})
### 例

[comment]: # ({/b41637d2-b41637d2})

[comment]: # ({76b3a49e-e1a75e7b})
#### ユーザーグループの無効化

ユーザーグループを無効にします

Request:

```json
{
    "jsonrpc": "2.0",
    "method": "usergroup.update",
    "params": {
        "usrgrpid": "17",
        "users_status": "1"
    },
    "auth": "038e1d7b1735c6a5436ee9eae095879e",
    "id": 1
}
```

Response:

```json
{
    "jsonrpc": "2.0",
    "result": {
        "usrgrpids": [
            "17"
        ]
    },
    "id": 1
}
```

[comment]: # ({/76b3a49e-e1a75e7b})

[comment]: # ({d5c7ed4f-d5c7ed4f})
### 参照

-   [Permission](object#permission)

[comment]: # ({/d5c7ed4f-d5c7ed4f})

[comment]: # ({09e213c5-09e213c5})
### ソース

CUserGroup::update() in *ui/include/classes/api/services/CUserGroup.php*.

[comment]: # ({/09e213c5-09e213c5})
