Groupmembers
Add a user to the group members. Only administrators and managers of the group are allowed to perform this action. If attempted to add a user multiple times to a group, nothing will happen and their original membership record will be returned.
Example:
curl -X POST -H "X-Session-ID: 0123456789" -H "Content-Type: application/json" --data @data.json "https://lor.instructure.com/api/groups/1234/members"
data.json:
{
"userId": "4LjxagScJoIlBACBRTI1XLXzCtTRn1CPDBLhWPEP:canvas-lmsf1ca849dd34eaef8040de8ffa7fe7fd5983e57e2",
"isManager": true
}
The group id
The identifier for the user to add to the group
Whether or not this user is a manager of the group
POST /api/groups/{id}/members HTTP/1.1
Host: lor.instructure.com
x-session-id: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 121
{
"userId": "4LjxagScJoIlBACBRTI1XLXzCtTRn1CPDBLhWPEP:canvas-lmsf1ca849dd34eaef8040de8ffa7fe7fd5983e57e2",
"isManager": true
}
{
"id": "text",
"groupId": "text",
"userId": "text",
"userName": "text",
"userEmail": "text",
"isManager": true
}
Gets a list of all the members in the group. Only Administrators and group managers are allowed to perform this action.
Example:
curl -H "X-Session-ID: 0123456789" "https://lor.instructure.com/api/groups/1234/members"
The group id
GET /api/groups/{id}/members HTTP/1.1
Host: lor.instructure.com
x-session-id: YOUR_API_KEY
Accept: */*
{
"items": [
{
"id": "text",
"groupId": "text",
"userId": "text",
"userName": "text",
"userEmail": "text",
"isManager": true
}
]
}
Update a member of the group by membership id. Can be used to change group managers. Only Administrators and group managers are allowed to perform this action. A manager cannot update their own management status.
Example:
curl -X PUT -H "X-Session-ID: 01234567890" -H "Content-Type: application/json" --data @data.json "https://lor.instructure.com/api/groups/1234/members/56789"```
data.json:
{
"isManager": true
}
The group id
The group membership id
Whether or not this user is a manager of the group
PUT /api/groups/{id}/members/{memberId} HTTP/1.1
Host: lor.instructure.com
x-session-id: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 18
{
"isManager": true
}
{
"id": "text",
"groupId": "text",
"userId": "text",
"userName": "text",
"userEmail": "text",
"isManager": true
}
Removes a member from the group by membership id. Only Administrators and group managers are allowed to perform this action. A manager cannot remove themself from the group.
Example:
curl -X DELETE -H "X-Session-ID: 01234567890" "https://lor.instructure.com/api/groups/1234/members/56789"
The group id
The group membership id
DELETE /api/groups/{id}/members/{memberId} HTTP/1.1
Host: lor.instructure.com
x-session-id: YOUR_API_KEY
Accept: */*
No content
Last updated
Was this helpful?