UpdateGroup
client.groups.update(GroupUpdateParams { description, groupId, name } body, RequestOptionsoptions?): GroupUpdateResponse { group }
POST/gitpod.v1.GroupService/UpdateGroup
Updates group information.
Use this method to:
- Rename a group
- Update group description
Examples
-
Update group name:
Changes the name of an existing group.
groupId: "d2c94c27-3b76-4a42-b88c-95a85e392c68" name: "Platform Team" description: "Platform engineering team"
Authorization
Requires org:admin permission on the organization or group:admin permission on the specific group.
UpdateGroup
import Gitpod from '@gitpod/sdk';
const client = new Gitpod({
bearerToken: process.env['GITPOD_API_KEY'], // This is the default and can be omitted
});
const group = await client.groups.update({
description: 'Platform engineering team',
groupId: 'd2c94c27-3b76-4a42-b88c-95a85e392c68',
name: 'Platform Team',
});
console.log(group.group);{
"group": {
"id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
"createdAt": "2019-12-27T18:11:19.117Z",
"description": "description",
"directShare": true,
"memberCount": 0,
"name": "xxx",
"organizationId": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
"systemManaged": true,
"updatedAt": "2019-12-27T18:11:19.117Z"
}
}Returns Examples
{
"group": {
"id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
"createdAt": "2019-12-27T18:11:19.117Z",
"description": "description",
"directShare": true,
"memberCount": 0,
"name": "xxx",
"organizationId": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
"systemManaged": true,
"updatedAt": "2019-12-27T18:11:19.117Z"
}
}