I am trying to get user details like their name, email, phone, about me, department and position.
I am getting only following as response and no expandable properties.
URL - "/rest/api/user?username=sample"
PS - I have modified to JSON details above to hide personal details.
I'm fairly familiar with the Confluence API and I'm pretty sure that there is no way to get the information that you require via the REST API. Only name and e-mail should be available, but unfortunately phone, about me, department, and position are not accessible.
I stand corrected. It does seem possible to get the details using the new /rest/user API endpoint. Here is the usage:
https://<confluence_url>/<context_path, if there is one>/rest/api/user?username=<username>&expand=details.personal,details.business
details.personal contains phone, website, and e-mail, and details.business contains position, department, and location.
I also want to get the email address via REST, but it's missing.
That's what I got for:
We are using the external LDAP user directory. Confluence Version 6.2.1.
Thanks for your help!
It appears that the expansions are not available for Confluence Server yet; I tested on Cloud and thought that it would be the same, but apparently the products are developing at a different pace.
An alternative to be able to get the e-mail address:
The result should be in displayableEmail.
This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.Read more
To anyone who doubts that Atlassians are a little too obsessed with collaboration, and tools related thereto, let me describe a recent discussion we had (which took place on our internal Confluence, ...
Connect with like-minded Atlassian users at free events near you!Find a group
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no AUG chapters near you at the moment.Start an AUG
You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs