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 any of the following calls:
Resource URL
https://www.drillster.com/api/2.1.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. |
resultFrom optional |
String | The ID of the last element from the previous page as quoted in the 2.1.1 Pagination object. Use this parameter, in combination with resultSize , to apply pagination of the result; it will limit the number of group included in the result. If it is not specified, the first page will be displayed. |
resultSize optional |
Integer | The maximum number of group to include in the result. If not specified, at most 10 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.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.1 Group objects (groups).
Example request
GET https://www.drillster.com/api/2.1.1/groups
Response
{
"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"
}],
"pagination": {
"total": 1,
"lastOnPage": 1,
"moreAvailable": false
}
}
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. |
Last updated on