PUT group/…/staff/…/…
Update permissions for group staff users.
A group's staff users are users that can manage a group in terms of content and membership, or access the progress of group members. There are two levels of permission:
MANAGE
– staff user may add or remove content, add or remove members and access progress of group members.VIEW
– staff user may view group contents and membership, and access progress of group members.
Resource URL
https://www.drillster.com/api/2.1.1/group/{group_id}/staff/{user_id}/{permission}
Parameters
Field | Type | Description |
---|---|---|
group_id required |
String | The ID of the group. Example value: pX3rn8LnXn5QM3mzwmSXDnDYeDpsnIqsHoXEKN2N3_B . |
user_id required |
String | The user ID of the staff user. Example value: m3XfGV1LQhu729lfVYa_sQ |
permission required |
String | The desired permission for the staff user. Example value: MANAGE or VIEW . |
If a PUT request has no body (i.e. the body is empty), it is still mandatory to include a Content-Length header (i.e.
Content-Length: 0
). Not all HTTP clients do this automatically. For more information, please see RFC 2616.
Response
A 2.1.1 GroupStaff object, detailing the staff access of the group.
Example request
PUT https://www.drillster.com/api/2.1/group/pX3rn8LnXn5QM3mzwmSXDnDYeDpsnIqsHoXEKN2N3_B/staff/m3XfGV1LQhu729lfVYa_sQ/MANAGE
Response
{
"group": {
"id": "pX3rn8LnXn5QM3mzwmSXDnDYeDpsnIqsHoXEKN2N3_B"
},
"count": 1,
"groupStaffUsers": [{
"group": {
"id": "pX3rn8LnXn5QM3mzwmSXDnDYeDpsnIqsHoXEKN2N3_B"
},
"user": {
"type": "USER",
"id": "m3XfGV1LQhu729lfVYa_sQ",
"name": "Jane Doe",
"avatar": {
"type": "image/png",
"url": "https://www.drillster.com/bin/avatar/330b901c200be68b852885e3a7eb31f7e938f29d"
},
"locale": "nl"
},
"permission": "MANAGE"
} ]
}
Error responses
The following error situations are possible:
ID | Description |
---|---|
not_permitted |
User is not entitled to view details for the group, or other access problem. |
unknown_group |
Requested group is not known. |
user_missing |
No staff user specified. |
unknown_user |
Given staff user is not known. |
Last updated on