Developer Function: API: Group Operations: Update Group
## Overview
You can update groups using the API.
## Preparation
Please [Create an API Key](/manual/api-key) before performing API operations. Also, this function can only be performed by the tenant manager, so please set up the tenant manager from user management.
## Request
Send json data in the following request format:
|Setting column|Value|
|:--|:--|
|HTTP Method|POST|
|Content-Type |application/json|
|Character Code|UTF-8|
|URL|http://{server name}/api/groups/{record Id}/update(*1)|
|Body|Please refer to the json data below|
(*1) Please edit the {server name} and {record Id} parts to suit your environment as appropriate.
For pleasanter.net, the format is as follows:
https\://pleasanter.net/fs/api/groups/{record Id}/update
##### JSON
```
{
"ApiVersion": 1.1,
"ApiKey": "026dfsS19fds1y7ayR1R5b67..",
"GroupName": "[Updated group name]",
"Body": "Sample of group update by API.",
"GroupMembers": [
"User,1,True",
"Dept,1,False"
],
"GroupChildren": [
"Group,1,"
]
}
```
#### About GroupMembers
1. Specify the information of users and departments to be group members in an array, separated by commas.
1. Group members are updated by review. Please write all information of newly added group members and group members whose affiliation will not change in the array.
|Column|e.g.|Settings|
|:--|:--|:--|
|Column 1|User|If you want to register a user, specify 'User'. If you want to register a dept, specify 'Dept'. |
|Column 2|1|Specify the user/dept ID. |
|Column 3|True|If you want to grant administrator privileges, set it to True. If not, set it to False. |
#### About GroupChildren
1. Specify the information of the groups to be added to the child group in an array, separated by commas.
1. Child groups are updated by review. Please write all the information of the newly added group and the groups that will not be changed in the array.
|Column|Settings|
|:--|:--|
|Column 1|Fixed to 'Group'. |
|Column 2|Specify the group ID. |
|Column 3|Fixed to blank. |
## Response
The json data in the following format will be returned.
##### JSON
```
{
"Id": 12345,
"StatusCode": 200,
"Message": "Updated \"New Group Name\"."
}
```
## Supported Versions
|Supported versions|Body|
|:--|:--|
|1.2.24.0 and later|Added function|
|1.3.4.0 and later|Added GroupMembers|
## Confirmation Column in Case of Error
[・Precautions when using the API and things to check if an error occurs](/manual/faq-api)
[・FAQ: What to check if modified configuration files or API requests (JSON format) are not recognized correctly](/manual/faq-json-format)
## Specification Changes
***API specifications have been partially changed since October 2019.**
- Classification, Numerical Value, Date, Description, and Check Column have been changed from being directly entered in the JSON to being entered within "~Hash".
***API specifications have been partially changed since November 2018.**
- The URL format has been changed from '/pleasanter/api_items/xxxx' to '/pleasanter/api/items/xxxx'.
- The Content-Type specification has been changed from 'application/x-www-form-urlencoded' to 'application/json'.