PUT group/…

Updates group details.

Resource URL

https://www.drillster.com/api/2.1/group/{group_id}

Parameters

Field Type Description
group_id
required
String The ID of the group.

Example value: pX3rn8LnXn5QM3mzwmSXDnDYeDpsnIqsHoXEKN2N3_B.
name
required
String The name of the group.
description
required
String The group's description.
iconKey
optional
String A reference to a previously uploaded icon.
catalogRestriction
optional
String The ID of a catalog to restrict this group to. A restricted group only allows content from this catalog, and users having access to this catalog. A catalog restriction can only be set to a group if it currently does not contain any content (drills) or members.
catalogRestrictionMode
optional
String If a catalogRestriction is specified, the mode determines the requirement for users to join the group. Two modes exist:

  • REQUIRE (default) A user must have access to the catalog in order to join the group.
  • GRANT A user will be granted access to the catalog when he joins the group.
The GRANT mode can only be used if the owner of the catalog has granted explicit permission to the organization of this group to use this mode.
catalogRestrictionRemove
optional
Boolean true must be specified to remove an existing restriction. A restriction can only be removed if the group is completely empty (no content and no members). catalogRestriction must not be specified.

💡 Good to know

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 Group object, reflecting the updates.

Error responses

The following error situations are possible:

ID Response code Description
not_found 404 (Not found) Group not found
invalid_name 400 (Bad request) Given group name is not valid
invalid_description 400 (Bad request) Given group description is not valid
icon_upload_failed 500 (Internal error) Could not process group icon
invalid_group_id 400 (Bad request) Group ID is not valid
invalid_catalog_restriction_mode 400 (Bad request) Catalog restriction mode is not valid
group_not_empty 400 (Bad request) A restriction was set or removed, but the group is not empty
no_permission 403 (Forbidden) No permission to change group details, no access to the provided restriction catalog, or the catalog restriction mode can not be used for this catalog.