跳至主要內容
Adaptive Planning
上次更新時間 :2024-03-08
Groups

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=1
Sample Request Header:
Accept-Language: en
Sample Request Body
Query Parameters
Name
Description
Required
groupId
The ID of the group you want to return individually
N
includeUsers
To determine whether or not to return users of groups being called. By default, include users is on.
N
limit
The maximum number of objects in a single response.
N
offset
To 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.
N
instanceCode
By 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 Element
Tag Name
response
Attributes of the Element
Attribute Name
Required?
Value
Example
total
Y
Total number of groups.
3
groups
Y
Group 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": [] }
groupType
Y
Shows the type of group.
External
id
Y
Associated id of the group.
1
name
Y
Name of the group.
"Admins"
users
N
If 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" }
links
N
When 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" }
next
N
If 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"
previous
N
If 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 Element
Information related to indicated elements.
Error Responses
Errors
Cause
Specify valid parameter values for limit and offset.
invalid input for limit/offset values
GroupAPI: For getGroupByGroupId, group not found for instance code: {TENANT}
groupId does not exist for instance code
You do not have all the permissions to run this API: Manage Global User Groups.
user credentials do not have proper permissions to evoke API call
Invalid credential
credentials used are incorrect for instance
HTTP 404 Not Found
groupId parameter is invalid