Groups
URL Endpoint
HTTPS://api.adaptiveplanning.com/api/rest/security/<version>/<tenant>/groups/{groupID}
Version: v1
Category
| Metadata retrieval |
Description
| Return the complete list of all groups defined for the given instance. This includes those groups defined global across whole instance and those groups defined by users. |
Permissions Required To Invoke
| Admin access > Users |
Parameters Required On Request
| Credentials |
Supported HTTP VERB(s)
HTTP Verb | Single Resource | Collection Resource | Description |
|---|---|---|---|
GET
| Supported | Supported | Retrieves groups from planning. |
GET:
- Request:
- /groups/{groupId}Retrieves the list of all groups and their users/members defined for the given instance.Sample Request URI:HTTPS://api.adaptiveplanning.com/api/rest/security/v1/default/groups?instanceCode=globalsales&offset=2&limit=1Sample Request Header:Accept-Language: enSample Request BodyQuery ParametersNameDescriptionRequiredgroupIdThe ID of the group you want to return individuallyNincludeUsersTo determine whether or not to return users of groups being called. By default, include users is on.NlimitThe maximum number of objects in a single response.NoffsetTo show a certain amount of groups per page. If there's more groups than limit, then the extra groups will go on to next page. To access a certain page, you need to specify offset value.NinstanceCodeBy default, it will return the default instance user is assigned. By providing a value, you can call instances that your user has access to, including parent/child instances.N
- Sample Response
- Sample Response{ "links": { "next": "HTTPS://api.adaptiveplanning.com/api/rest/security/v1/default/groups?instanceCode=TENANT&offset=2&limit=1", "previous": "HTTPS://api.adaptiveplanning.com/api/rest/security/v1/default/groups?instanceCode=TENANT&offset=0&limit=1" }, "total": 3, "groups": [ { "id": 2, "name": "Admins", "groupType": "NATIVE", "users": [ { "userGuid": "randomValue", "wid": "", "userName": "test@email.com" }, { "userGuid": "randomValue", "wid": "", "userName": "test2@email.com" }, ] }, { "id": 1, "name": "Corporate and Operations", "groupType": "NATIVE", "users": [] }, { "id": 3, "name": "Ops and Admins", "groupType": "NATIVE", "users": [], "groups": [ { "id": 2, "name": "Admins", "groupType": "NATIVE" }, { "id": 1, "name": "Corporate and Operations", "groupType": "NATIVE" } ] } ] }Response ElementTag NameresponseAttributes of the ElementAttribute NameRequired?ValueExampletotalYTotal number of groups.3groupsYGroup information of all or specified groups. If a group is inside another group, then it also shows groups associated with indicated group.{ "id": 1, "name": "Corporate and Operations", "groupType": "NATIVE", "users": [] }groupTypeYShows the type of group.ExternalidYAssociated id of the group.1nameYName of the group."Admins"usersNIf includeUsers = true or includeUsers is default, it is provided with user's guid, wid, and username. if not it is not returned."users": [ { "userGuid": "randomValue", "wid": "", "userName": "test@example.com" }, { "userGuid": "randomValue", "wid": "", "userName": "test2@example.com" }linksNWhen limit and/or offset is provided and you need a means to move to different pages of groups, you can use links to move back and forth."links": { "next": "HTTPS://api.adaptiveplanning.com/api/rest/security/v1/default/groups?instanceCode=TENANT&offset=2&limit=1", "previous": "HTTPS://api.adaptiveinsights.com/api/rest/security/v1/default/groups?instanceCode=TENANT&offset=0&limit=1" }nextNIf limit is provided and there's a next page available, then "links" appears with "next"."HTTPS://api.adaptiveplanning.com/api/rest/security/v1/default/groups?instanceCode=TENANT&offset=2&limit=1"previousNIf limit & offset is provided and you happen to be in the middle where a previous and further page is available, "previous" is available."HTTPS://api.adaptiveplanning.com/api/rest/security/v1/default/groups?instanceCode=TENANT&offset=2&limit=1"Contents of the ElementInformation related to indicated elements.Error ResponsesErrorsCauseSpecify valid parameter values for limit and offset.invalid input for limit/offset valuesGroupAPI: For getGroupByGroupId, group not found for instance code: {TENANT}groupId does not exist for instance codeYou do not have all the permissions to run this API: Manage Global User Groups.user credentials do not have proper permissions to evoke API callInvalid credentialcredentials used are incorrect for instanceHTTP 404 Not FoundgroupId parameter is invalid