It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

get the list of all users with confluence api - how to Edited

Hi!

I tried to do smth like confluence/rest/api/user?username=a and username=* and some other cases but it shows an error

No user found with key : null

so is the key the must parameter?

and is there a wildcard  for any parameter so I could get the list of all users

or any other way I could do it?

any help would be really appreciated

2 answers

1 vote
miikhy Community Leader Jan 09, 2019

Hi!

The documentation mentions that a parameter is required and there is no known wildcard option. That being said, the usual trick I use is to query the confluence-users group members which list all users having access:

/rest/api/group/confluence-users/member

You can also create a group with all users even unlicensed and use the same endpoint.

Feels like a workaround but it's working well!

Hope it helps!

Cheers

Hi @miikhy

Thanks for your answer. I tried the exact query you sent but It returns admin user only, did I misunderstood you and there are some extra things/steps I need to do?

miikhy Community Leader Jan 09, 2019

Hi @mzhydenko,

Have you tried adding ?limit=500 to get more results?

Also, the group name in the URL is the group you're browsing, are non-admin users members of this group? Just tried it locally and it worked well :(

Cheers

Like mzhydenko likes this

Thank you @miikhy!

I`ll try that and hope it`ll work for me too.

Have a nice day :)

miikhy Community Leader Jan 09, 2019

Great!

Keep us posted!

Cheers

This worked for me, thank you so much!

I did want to point out though that confluence-users is the default user group that gets some one access, but it could be something else if configured so. for instance, my company uses the group atlassian-users to grant access to Confluence, JIRA, and BitBucket.

I know I'm a bit late to the party but you future reference. There is one more way to get a list of all users without specifying the limi by making a get request to the  following end point: 

http://localhost:1990/confluence/rest/user-management/1.0/users

This will return you all the users. I hope this helps :)  

Yes it helps !
It works file with Jira Server v8.5.
Thank you for this trick.

I will be surprised if the end point worked for Jira as I mentioned, this endpoint is for confluence, having said that I haven't tried it for Jira. Just to reconfirm, it did work for you when you tried it for Jira and not confluence, right?  

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Posted in Confluence

What project did you transition or start on Confluence with the shift to remote work?

It’s been great to hear from fellow users over the last few weeks about the best tips and fun moments you’ve had working on Confluence since the transition to working remote. I’d love to keep the c...

109 views 3 7
Join discussion

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you