All of our users are in confluence-users so that's a simplifying assumption we can use. I wrote a script to pull out all the users using <url>/rest/api/group<group name>/member and I certainly got a list.
To my chagrin I discovered that the list makes no distinction between Active and Inactive users. So I can then call the <url>/rest/api/user?username=<username> api to get more information, right?
But it doesn't tell me if the user is active or inactive, either!
From exploring these forums I gather that there is no better way (using the rest api) to get a list of users so my best hope is to find a way to determine if a user is active or inactive.
Is there a way to do that!?
I'm on Confluence Server if that makes a difference.
There is a way to do this, sort of, without creating a new REST API.
First off, understand that there is no way to get USERS through the API: you can only get users in a group.
If you get the users from the confluence-users group that will probably be all the users on your system (this is true of our system).
The way you find out if this is true for you is to look in the global permission: <your_URL>/admin/permissions/globalpermissions.action. This will list the groups that have all the users who can actually do anything. There may be users on your system who are not in any of these groups but they have no access to anything (and they don't count against licensing).
My problem: some of the users in confluence-users were inactive so my final list included some inactive users. But inactive users have no business being in groups – they should be removed!
Once I removed them, the list of confluence-users IS the list of active users.
In summary: to get a list of users you need a group or a collection of groups that have all the users in it. Then you need to make sure that these groups have no inactive users. Then you can uses the <url>/rest/api/group<group name>/member API to get the users from those groups (be sure to remove any duplicates from the aggregated list) and it will be correct!
<url>/rest/api/group<group name>/member API is not retrieving more than 200 members in a group.Is there a way to get rid of the system default limit 200?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
yeah it's not listing above 200. please help me to get out of this
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
If you've already search and found no REST api to do it, you'll probably have to write your own REST api to expose that data.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.