REST API - Users
- 1 Get all users (only those with access to use Confluence)
- 2 Get all users
- 3 Get all inactive users
- 4 Get user details
- 5 Add user
- 6 Change username
- 7 Change user details
- 8 Delete user
- 9 Clear user CAPTCHA
- 10 Activate/deactivate user
- 11 Get user property
- 12 Set user property
- 13 Get an avatar for any user
- 14 Set avatar for any user
- 15 Pagination
- 16 Changes
General informations
Available for Confluence Administrators
Get all users (only those with access to use Confluence)
This API supports Pagination
This API supports optional parameters
This API returns only users with access to use Confluence
Method type - GET
URL
{CONFLUENCE_URL}/rest/extender/1.0/user/getUsersWithConfluenceAccess
{CONFLUENCE_URL}/rest/extender/1.0/user/getUsersWithConfluenceAccess?showBasicDetails=true
{CONFLUENCE_URL}/rest/extender/1.0/user/getUsersWithConfluenceAccess?showExtendedDetails=true
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'
Respons format: JSON
Example response:
Without parameters
{
"total": 2,
"maxResults": 50,
"startAt": 0,
"users": [
{
"name": "new_user"
},
{
"name": "admin"
}
]
}
With parameter showBasicDetails=true
{
"total": 2,
"maxResults": 50,
"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"
}
]
}
With parameter showExtendedDetails=true
"total": 1,
"maxResults": 50,
"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
}
]
}
Get all users
Method type - GET
URL
{CONFLUENCE_URL}/rest/extender/1.0/user/getAllUsers
{CONFLUENCE_URL}/rest/extender/1.0/user/getAllUsers?username=min
{CONFLUENCE_URL}/rest/extender/1.0/user/getAllUsers?email=gmail
{CONFLUENCE_URL}/rest/extender/1.0/user/getAllUsers?showBasicDetails=true
{CONFLUENCE_URL}/rest/extender/1.0/user/getAllUsers?showExtendedDetails=true
{CONFLUENCE_URL}/rest/extender/1.0/user/getAllUsers?showBasicDetails=true&email=gmail
{CONFLUENCE_URL}/rest/extender/1.0/user/getAllUsers?showExtendedDetails=true&username=min
Parameters:
showBasicDetails, showExtendedDetails - for details please check Example response
username, email - parameters thanks to which you can search for users containing keywords in the username or e-mail (you can only search for one parameter at a time)
dateFormat - define date format for date fields in output JSON - default format ‘yyyy-MM-dd'
Respons format: JSON
Example response:
Without parameters
With parameter showBasicDetails=true
With parameter showExtendedDetails=true
Get all inactive users
Method type - GET
URL
{CONFLUENCE_URL}/rest/extender/1.0/user/getInactiveUsers
{CONFLUENCE_URL}/rest/extender/1.0/user/getInactiveUsers?showBasicDetails=true
{CONFLUENCE_URL}/rest/extender/1.0/user/getInactiveUsers?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'
Respons format: JSON
Example response:
Without parameters
With parameter showBasicDetails=true
With parameter showExtendedDetails=true
Get user details
Method type - GET
URL: {CONFLUENCE_URL}/rest/extender/1.0/user/getUserDetails/{userName}
where {userName} is user name like 'admin'
Parameters:
dateFormat - define date format for date fields in output JSON - default format ‘yyyy-MM-dd'
Example URL:
{CONFLUENCE_URL}/rest/extender/1.0/user/getUserDetails?dateFormat=MM/dd/yyyy
{CONFLUENCE_URL}/rest/extender/1.0/user/getUserDetails?dateFormat=dd.MM.yyyy
Response format: JSON
Example response:
Add user
Method type - PUT
URL: {CONFLUENCE_URL}/rest/extender/1.0/user/add
Request format: JSON
name - required
fullName - required
email - required
password - optional
sendMail - optional - true or false - send an email message informing the person of their account (name, fullName and password)
groups - optional - since v. 2.4.1 user is added to the default Confluence group, if you want to add it to another group, add this parameter
Response format: JSON
Change username
Method type - POST
URL: {CONFLUENCE_URL}/rest/extender/1.0/user/rename/{userName}
where {userName} is user name
Example URL: {CONFLUENCE_URL}/rest/extender/1.0/user/rename/test_user
Request format: JSON
Response format: JSON
Change user details
Method type - POST
URL: {CONFLUENCE_URL}/rest/extender/1.0/user/changeDetails/{userName}
where {userName} is user name
Request format: JSON
fullName - required
email - required
password - required
Response format: JSON
Delete user
Method type - delete
URL: {CONFLUENCE_URL}/rest/extender/1.0/user/delete/{userName}
where {userName} is user name
Response format: JSON
Clear user CAPTCHA
Method type - delete
URL: {CONFLUENCE_URL}/rest/extender/1.0/user/captcha/{userName}
where {userName} is user name
Response format: JSON