REST API - Groups

General informations

Availability

Check availability in each rest api documentation


Get group users

Available for all confluence users

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 - GET

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: JSON

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

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

{ "total": 4, "maxResults": 100, "startAt": 0, "users": [ { "name": "new_user" }, { "name": "admin" } ] "status":"success" }
  • With parameter showBasicDetails=true

{ "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

{ "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

Method type - GET

URL: {CONFLUENCE_URL}/rest/extender/1.0/group/getGroups

Response format: JSON




Add groups

Method type - POST

URL: {CONFLUENCE_URL}/rest/extender/1.0/group/addGroups

Request format: JSON

Response format: JSON

 


Remove groups

Method type - POST

URL: {CONFLUENCE_URL}/rest/extender/1.0/group/removeGroups

Request format: JSON

Response format: JSON

 


Add users to group

Method type - POST

URL: {CONFLUENCE_URL}/rest/extender/1.0/group/addUsers/{GROUP}

  • where {GROUP} group name in Confluence.

Request format: JSON

Response format: JSON

 


Remove users from group

Method type - POST

URL: {CONFLUENCE_URL}/rest/extender/1.0/group/removeUsers/{GROUP}

  • where {GROUP} group name in Confluence.

Request format: JSON

Response format: JSON

 


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:

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.