Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Rest API

Araz.Valizada
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
November 10, 2021

Hello dear Community members. I want to ask about Jira Rest API. We are collecting user details through Rest API with GET /rest/api/2/user method. It shows only 10 users email section, other users are shown without email field. how can we get all users email list with API? also in the user details can we get Department information? there is no field in the documentation with department info.
Regards

2 answers

0 votes
Alex Medved _ConfiForms_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
November 12, 2021

Hi

With GDPS enforced you cannot get emails by querying "/rest/api/2/user" (unless users made their emails publicly visible)

There is a dedicated method if you are developing a connect app

https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-users/#api-rest-api-3-user-email-get

But you will need to get an approval from Atlassian to use it

as Marc has mentioned there is no department information - see https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-users/#api-rest-api-3-user-get and the "User" value/response (structure) it returns

Alex

Araz.Valizada
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
November 12, 2021

Hi Alex. Thank you for your response.
You have mentioned that there is no department info in user-get method, but is it possible to get this information with other method?

Alex Medved _ConfiForms_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
November 12, 2021

I am not aware of any. Honestly I dont think Jira has this information - see https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/

Alex

0 votes
marc -Collabello--Phase Locked-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
November 12, 2021

@Araz.Valizada As far as I know, department info is not stored in the Jira user information.

Suggest an answer

Log in or Sign up to answer