General informations
Table of Contents | ||
---|---|---|
|
Info |
---|
Availability Check availability in each rest api documentation |
Get group users
Available for all confluence users
Info |
---|
This API returns all users with and without access to use Confluence Since v. 2.7.0 this API supports Pagination Since v. 2.8.0 - removed parameter showDetails, added parameters showBasicDetails and showExtendedDetails |
Method type -
Status | ||||
---|---|---|---|---|
|
URL:
{CONFLUENCE_URL}/rest/extender/1.0/group/getUsers/{GROUP}
{CONFLUENCE_URL}/rest/extender/1.0/group/getUsers/{GROUP}?showBasicDetails=true
{CONFLUENCE_URL}/rest/extender/1.0/group/getUsers/{GROUP}?showExtendedDetails=true
where {GROUP} group name in Confluence.
Response format:
Status | ||
---|---|---|
|
Example URL:
{CONFLUENCE_URL}/rest/extender/1.0/group/getUsers/confluence-users
{CONFLUENCE_URL}/rest/extender/1.0/group/getUsers/confluence-users?showBasicDetails=true
{CONFLUENCE_URL}/rest/extender/1.0/group/getUsers/confluence-users?showExtendedDetails=true
Info |
---|
Calling with a parameter showBasicDetails or showExtendedDetails may affect the response time |
Parameters:
showBasicDetails, showExtendedDetails - for details please check Example response
dateFormat - define date format for date fields in output JSON - default format ‘yyyy-MM-dd'
Example response:
Without parameters
Code Block | ||||
---|---|---|---|---|
| ||||
{ "total": 4, "maxResults": 100, "startAt": 0, "users": [ { "name": "new_user" }, { "name": "admin" } ] "status":"success" } |
With parameter showBasicDetails=true
Code Block | ||||
---|---|---|---|---|
| ||||
{ "total": 4, "maxResults": 100, "startAt": 0, "users": [ { "name": "new_user", "fullName": "New user", "key": "4128810272455d7b0172457188c10000", "email": "new@user.pl" }, { "name": "admin", "fullName": "admin", "key": "4128810272455d7b0172457188c10005", "email": "admin@admin.com" } ] "status":"success" } |
With parameter showExtendedDetails=true
Code Block | ||||
---|---|---|---|---|
| ||||
{ "total": 4, "maxResults": 100, "startAt": 0, "users": [ { "business": [ { "location": "", "position": "", "department": "" } ], "lastFailedLoginDate": null, "lastSuccessfulLoginDate": null, "fullName": "Admin CEO", "personal": [ { "website": "", "im": "", "phone": "" } ], "updatedDate": 1590302967994, "lastFailedLoginDateString": null, "createdDate": 1590302967994, "createdDateString": "2020-05-24 08:49:27", "name": "Admin", "lastSuccessfulLoginDateString": null, "key": "4128810272455d7b0172457188c10000", "email": "admin@admin.com", "updatedDateString": "2020-05-24 08:49:27", "hasAccessToUseConfluence": true } ] "status":"success" } |
Get all groups
Available for all confluence users
Since since v. 2.7.0 this API supports Pagination
Info |
---|
Available since v. 1.1.1 |
Method type -
Status | ||||
---|---|---|---|---|
|
URL: {CONFLUENCE_URL}/rest/extender/1.0/group/getGroups
Response format:
Status | ||
---|---|---|
|
Code Block | ||||
---|---|---|---|---|
| ||||
{ "total": 2, "maxResults": 100, "startAt": 0, "groups": [ "confluence-administrators", "confluence-users" ], "message":"", "status":"success" } |
Add groups
Available for Confluence Administrators
Method type -
Status | ||||
---|---|---|---|---|
|
URL: {CONFLUENCE_URL}/rest/extender/1.0/group/addGroups
Request format:
Status | ||
---|---|---|
|
Code Block | ||||
---|---|---|---|---|
| ||||
{ "groups": [ "group1" ] } |
Code Block | ||||
---|---|---|---|---|
| ||||
{ "groups": [ "group1", "group2", "group3" ] } |
Response format:
Status | ||
---|---|---|
|
Code Block | ||||
---|---|---|---|---|
| ||||
{ "groupsAdded": [ "group1" ], "groupsSkipped": [], "message": "all groups added", "status": "success" } |
Code Block | ||||
---|---|---|---|---|
| ||||
{ "groupsAdded": [ "group2" ], "groupsSkipped": [ "group1" ], "message": "groups added, some groups skipped", "status": "success" } |
Remove groups
Available for Confluence Administrators
Method type -
Status | ||||
---|---|---|---|---|
|
URL: {CONFLUENCE_URL}/rest/extender/1.0/group/removeGroups
Request format:
Status | ||
---|---|---|
|
Code Block | ||||
---|---|---|---|---|
| ||||
{ "groups": [ "group1" ] } |
Code Block | ||||
---|---|---|---|---|
| ||||
{ "groups": [ "group1", "group2", "group3" ] } |
Response format:
Status | ||
---|---|---|
|
Code Block | ||||
---|---|---|---|---|
| ||||
{ "groupsRemoved": [ "group1" ], "groupsSkipped": [], "message": "all groups removed", "status": "success" } |
Code Block | ||||
---|---|---|---|---|
| ||||
{ "groupsRemoved": [ "group2" ], "groupsSkipped": [ "group1" ], "message": "groups removed, some groups skipped", "status": "success" } |
Add users to the group
Available for Confluence Administrators
Method type -
Status | ||||
---|---|---|---|---|
|
URL: {CONFLUENCE_URL}/rest/extender/1.0/group/addUsers/{GROUP}
where {GROUP} group name in Confluence.
Request format:
Status | ||
---|---|---|
|
Code Block | ||||
---|---|---|---|---|
| ||||
{ "users": [ "user1" ] } |
Code Block | ||||
---|---|---|---|---|
| ||||
{ "users": [ "user1", "user2" ] } |
Response format:
Status | ||
---|---|---|
|
Code Block | ||||
---|---|---|---|---|
| ||||
{ "usersAdded": [ "user1" ], "usersSkipped": [], "message": "all users added to group", "status": "success" } |
Code Block | ||||
---|---|---|---|---|
| ||||
{ "usersAdded": [ "user2" ], "usersSkipped": [ "user1" ], "message": "users added to group, but some users skipped", "status": "success" } |
Remove users from the group
Available for Confluence Administrators
Method type -
Status | ||||
---|---|---|---|---|
|
URL: {CONFLUENCE_URL}/rest/extender/1.0/group/removeUsers/{GROUP}
where {GROUP} group name in Confluence.
Request format:
Status | ||
---|---|---|
|
Code Block | ||||
---|---|---|---|---|
| ||||
{ "users": [ "user1" ] } |
Code Block | ||||
---|---|---|---|---|
| ||||
{ "users": [ "user1", "user2" ] } |
Response format:
Status | ||
---|---|---|
|
Code Block | ||||
---|---|---|---|---|
| ||||
{ "usersRemoved": [ "user1" ], "usersSkipped": [], "message": "all users removed from group", "status": "success" } |
Code Block | ||||
---|---|---|---|---|
| ||||
{ "usersRemoved": [ "user2" ], "usersSkipped": [ "user1" ], "message": "users removed from group, but some users skipped", "status": "success" } |
Pagination
This REST API uses pagination to improve performance for all users. Pagination is enforced for methods that could return a large collection of items. When you make a request to a paged API, the response will wrap the returned array of values in a JSON object with paging metadata, for example:
Code Block | ||
---|---|---|
| ||
{ "startAt" : 0, "maxResults" : 10, "total": 200, "objects": [ { /* result 0 */ }, { /* result 1 */ }, { /* result 2 */ } ] } |
Where:
startAt
is the index of the first item returned in the page of results.maxResults
is the maximum number of items that can be returned per page. Each API endpoint may have a different limit for the number of items returned, and these limits may change without notice. (default value - 100)total
is the total number of items contained in all pages. This number may change as the client requests the subsequent pages, therefore the client should always assume that the requested page can be empty.