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

List a Group's Members

GET /groups/{groupId}/users

Parameters

  • limit (integer, optional) - the maximum number of results to return in a single response (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",
"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

Example response

{ 
"groups": [
{
"id": "example-group-id-1",
"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 add user to group because group does not exist
  • user_not_found - cannot add user to group because user does not exist
Did this answer your question?