PUT group/…/staff

PUT 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:

  1. MANAGE – staff user may add or remove content, add or remove members and access progress of group members.
  2. VIEW – staff user may view group contents and membership, and access progress of group members.

Resource URL

https://www.drillster.com/api/2/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.0 GroupStaff object, detailing the staff access of the group.

Example request

PUT https://www.drillster.com/api/2/group/pX3rn8LnXn5QM3mzwmSXDnDYeDpsnIqsHoXEKN2N3_B/staff/m3XfGV1LQhu729lfVYa_sQ/MANAGE

Response

{
  "group" : "pX3rn8LnXn5QM3mzwmSXDnDYeDpsnIqsHoXEKN2N3_B",
  "count" : 1,
  "groupStaffUsers" : [ {
    "group" : "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.