Replace the members of a group (identity:admin)
PUT /api/hr/v1/groups/{id}/members
Module: HR · operationId: setGroupMembers · Tag: Access · Auth: access token (Authorization: Bearer <accessToken>)
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id |
path | string (uuid) | yes |
Request body
application/json (required)
ids(array of string): The ids
Example:
{
"ids": [
"e5a1c3d7-2b4f-4c6e-8a0b-1d3f5b7c9e02",
"c7e9a1b3-5d7f-4b2c-8e4a-6f8b0d2c4e06",
"d1f3b5c7-9e1a-4d3f-8b5c-7a9e1f3b5d08"
]
}
Responses
- 200 Saved (
application/json) - 403 Error (
application/json) - 409 Error (
application/json)
Fields of the 200 answer:
name(string, required): Name of the groupdescription(string): Description of the groupid(string): Id of the groupmemberCount(integer, read-only): Number of membersroleIds(array of string, read-only): Ids of the roles the members receiveversion(integer): Version for optimistic locking: send the version you read with a change (stale: 409 version_conflict)
Example 200 answer:
{
"description": "Erste Annahme und Bearbeitung von Tickets",
"id": "21a3c5e7-9b1d-4d3f-8a5c-7e9b1d3f5a91",
"memberCount": 4,
"name": "Service Desk 1st Level",
"roleIds": [
"31b3d5f7-9a1c-4e3b-8d5f-7a9c1e3b5d40"
],
"version": 3
}
Example request
curl -X PUT 'https://api.mbcom.cloud/api/hr/v1/groups/3f2b8c1e-7d4a-4e9b-9c2a-5b1d6e8f0a12/members' \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H 'Content-Type: application/json' \
--data '{"ids":["e5a1c3d7-2b4f-4c6e-8a0b-1d3f5b7c9e02","c7e9a1b3-5d7f-4b2c-8e4a-6f8b0d2c4e06","d1f3b5c7-9e1a-4d3f-8b5c-7a9e1f3b5d08"]}'