Get user groups
Changed onThis endpoint returns all groups that a specific user is a member of. Corresponds to liveblocks.getUserGroups.
Request
- Base URL: https://api.liveblocks.io/v2
- URL: https://api.liveblocks.io/v2/users/{userId}/groups
- Auth: none declared
Path parameters
The ID of the user to get groups for.
Query parameters
A limit on the number of groups to be returned. The limit can range between 1 and 100, and defaults to 20.
A cursor used for pagination. Get the value from the nextCursor response of the previous page.
Response
Success. Returns the list of groups the user belongs to and the next page cursor.
Example response
{
"data": [
{
"type": "group",
"id": "engineering",
"organizationId": "org_123456789",
"createdAt": "2024-01-15T10:30:00.000Z",
"updatedAt": "2024-01-15T10:30:00.000Z",
"scopes": {
"mention": true
},
"members": [
{
"id": "alice",
"addedAt": "2024-01-15T10:30:00.000Z"
}
]
}
],
"nextCursor": null
}Changes
- info
the
response property const valuetruewas added for the status
- info
- breaking
for the
queryrequest parameterlimit, the type changed fromnumbertointeger - breaking
response property
nextCursorlist-of-types was widened by adding typesnullto media typeapplication/jsonof response200 - info
api operation id
get-users-userId-groupsremoved and replaced withget-user-groups - info
the response property
became required for the status - info
the response property
became required for the status - info
the
response property const valuegroupwas added for the status - info
removed the
groupenum value from the//response property for the response status
- breaking