GET groups

Searches in the list of all groups the calling user has access to.

Per group, only high-level information is returned. For more detailed information, use the group/…/results, group/…/members or group/…/drillables resources.

Resource URL

https://www.drillster.com/api/2.1/groups

Parameters

Field Type Description
query
optional
String An optional query to filter by group name or description. If no query is given, all groups are returned.
member
optional
String An optional group member user ID to filter by group member. Only groups of which the given user is a member are returned. If no member is given, all groups are returned.
resultStart
optional
Integer The index number (zero-based) of the first group to include in the result. Use this parameter, in combination with resultSize, to apply pagination of the result; it will limit the number of groups included in the result. Defaults to 0.
resultSize
optional
Integer The maximum number of groups to include in the result. If not specified, the results for all (remaining) groups are returned.
permission
optional
String constant Provides an optional group permission filter. Accepted values are: VIEW and MANAGE.

Please note that this filter works by exact match only. Even though users with MANAGE permission implicitly have the VIEW permission as well, filtering by VIEW will only return those groups for which the caller only has VIEW permission and not MANAGE.
profile
optional
String constant Indicates whether to retrieve the full details (DEFAULT) or only the limited detail required for an AUTO_COMPLETE use case).

Response

A 2.1 Groups object, containing the total number of groups that were found (total), regardless of the optionally specified resultStart and resultSize, and a list of 2.1 Group objects (groups).

Example request

GET https://www.drillster.com/api/2.1/groups

Response

{
  "total": 1,
  "groups": [ {
    "id": "mRdhqCfGQMOAlnN3SIlwvQ-2",
    "name": "Test group",
    "description": "This is a test",
    "counts": {
      "members": 1,
      "drillables": 1,
      "tests": 3
    },
    "icon": {
      "type": "image/png",
      "url": "https://www.drillster.com/img/icon-groups.png"
    },
    "created": "2015-07-21T16:48:08Z",
    "lastEdited": "2015-07-21T16:48:08Z"
  }]
}

Error responses

The following error situations are possible:

ID Response code Description
unauthenticated 401 (Unauthorized) User does not have permission to perform this action.
invalid_permission 400 (Bad request) Specified permission filter is not valid.