Update a group
A Group can be updated by sending the PUT
request to /groups/<groupId>.json
.
PUT /groups/<groupId>.json
{
"name": "newgroupname",
"groups_users": [{
"user_id": "<userId_to_add>",
"is_admin": false
}, {
"id": "<groupUserId_to_update_role>",
"is_admin": true
}, {
"id": "<groupUserId_to_remove>",
"delete": true
}],
"secrets":[{
"resource_id":"<resource_shared_with_group",
"user_id":"<new_userId>",
"data":"-----BEGIN PGP MESSAGE-----"
}]
}
When you update a group which has passwords shared with you also need to provide secrets for the new users. The dry-run gives information about this.
A dry run can also be performed before actually attempting to update a group:
PUT /groups/<groupId>/dry-run.json
This will check all the constraints and return a 200 OK response if the group can be updated safely.
Possible responses
Code | Description |
---|---|
200 | OK The group was updated. |
400 | Bad Request Some of the data validation failed. |
403 | Authentication Failure The user making the request is not authenticated |
Last updated
This article was last updated on April 23rd, 2019.You can also find the latest OpenAPI 2.0 specifications directly on the dedicated repository.
OpenAPI Specs repository