Skip to main content
Group Memberships API

Manage user membership in groups, list group members and user membership

Anthony Karcz avatar
Written by Anthony Karcz
Updated over 3 years ago

What This API Endpoint Does

With the Group Memberships API you can add users to and remove users from a group. Admins see this reflected on the People tab under either the individual user or group record. Any courses assigned to the group will appear in the user's library.

You can also use this API to retrieve a list of a group's members or the groups in which an individual user is enrolled.

Endpoints

  • GET /groups/{groupId}/users - list a group's members

  • GET /users/{userId}/groups - list a user's groups

  • PUT /groups/{groupId}/users/{userId} - add a user to a group

  • DELETE /groups/{groupId}/users/{userId} - remove a user from a group

Note: You can't use the PUT or DELETE endpoints to manage groups provisioned by SCIM.

List a Group's Members

GET /groups/{groupId}/users

Request Parameters (Query String)

  • limit (integer, optional) - the maximum number of results to return in a single response (see Pagination); must be between 1 and 100 (defaults to 50)

Example response

{ 
"users": [
{
"id": "example-user-id-1",
"email": "foo@example.com",
"groupsUrl": "<https://api.rise.com/users/example-user-id-1/groups>",
"role": "learner",
"firstName": "Example First Name 1",
"lastName": "Example Last Name 1",
"lastActiveAt": "2021-10-28T20:39:52.659Z",
"learnerReportUrl": "<https://api.rise.com/reports/learners/example-user-id-1>",
"url": "<https://api.rise.com/users/example-user-id-1>"
}, ...
],
"nextUrl": "<https://url-for-next-page-of-results>"
}

Endpoint-specific error codes:

  • group_not_found - cannot list users because group does not exist

List a User's Groups

GET /users/{userId}/groups

Request Parameters (Query String)

  • limit (integer, optional) - the maximum number of results to return in a single response (see Pagination); must be between 1 and 100 (defaults to 50)

Example response

{ 
"groups": [
{
"id": "example-group-id-1",
"isManagedByIdentityProvider": false,
"membersUrl": "<https://api.rise.com/groups/example-group-id/users>",
"name": "Example Group",
"url": "<https://api.rise.com/groups/example-group-id-1>"
}, ...
],
"nextUrl": "<https://url-for-next-page-of-results>"
}

Endpoint-specific error codes:

  • user_not_found - cannot list user's groups because user does not exist

Add User to Group

PUT /groups/{groupId}/users/{userId}

Success response

204 "No Content"

Endpoint-specific error codes:

  • group_not_found - cannot add user to group because group does not exist

  • user_not_found - cannot add user to group because user does not exist

Remove User from Group

DELETE /groups/{groupId}/users/{userId}

Success response

204 "No Content"

Endpoint-specific error codes:

  • group_not_found - cannot remove user from group because group does not exist

  • user_not_found - cannot remove user from group because user does not exist

Did this answer your question?