User groups
Create, modify, and delete organizational groups with member management capabilities.
List User Groups
GET /v1/users/{id}/groups
List groups a user is in.
Path Parameters:
id
(string, required): User UUID
Response (200 OK):
{
"id": "56d4b940-ae51-4515-b207-f63328a66b32",
"groupIds": [
"12a3b4c5-d6e7-8f90-1234-567890abcdef",
"98z7y6x5-w4v3-2u1t-0987-654321fedcba"
],
"groupDetails": [
{
"id": "12a3b4c5-d6e7-8f90-1234-567890abcdef",
"name": "Developers",
"numberOfUsers": 8
},
{
"id": "98z7y6x5-w4v3-2u1t-0987-654321fedcba",
"name": "QA Team",
"numberOfUsers": 5
}
]
}
Response (404 Not Found):
{
"message": "User not found",
"traceId": "09f9aa68-4d89-465b-8d6d-41490fff7727"
}
Update User Groups
PUT /v1/users/{id}/groups
Update groups a user is in.
Path Parameters:
id
(string, required): User UUID
Request Body:
{
"id": "56d4b940-ae51-4515-b207-f63328a66b32",
"groupIds": [
"12a3b4c5-d6e7-8f90-1234-567890abcdef",
"34f5e6d7-c8b9-0a12-3456-789012345678"
]
}
Response (200 OK):
{
"id": "56d4b940-ae51-4515-b207-f63328a66b32",
"groupIds": [
"12a3b4c5-d6e7-8f90-1234-567890abcdef",
"34f5e6d7-c8b9-0a12-3456-789012345678"
],
"groupDetails": [
{
"id": "12a3b4c5-d6e7-8f90-1234-567890abcdef",
"name": "Developers",
"numberOfUsers": 8
},
{
"id": "34f5e6d7-c8b9-0a12-3456-789012345678",
"name": "New Team",
"numberOfUsers": 3
}
]
}
Response (404 Not Found):
{
"message": "User not found",
"traceId": "09f9aa68-4d89-465b-8d6d-41490fff7727"
}
Response (422 Unprocessable Entity):
{
"message": "The given data failed to pass validation.",
"traceId": "09f9aa68-4d89-465b-8d6d-41490fff7727",
"errors": {
"groupIds": ["One or more group IDs are invalid"]
}
}
Updated 21 days ago