I'm trying to get all users from JIRA REST API. I need to save all users to my Database from my own java client. Is it possible to do that ?
If so how we going to do that?
You can get all users that are assignable to a specific project. If everyone is assignable you will get all users.
/rest/api/2/user/assignable/search?project=PROJECT
Curl:
curl -D -u USERNAME:PASSWORD -X GET -H "Content-Type: application/json" https://company.atlassian.net/rest/api/2/user/assignable/search?project=PROJECT
One possible way to get all of the users in your JIRA instance is to use the Crowd API's /rest/usermanagement/1/search
endpoint:
curl -X GET \
'https://jira.url/rest/usermanagement/1/search?entity-type=user&start-index=0&max-results=1000&expand=user' \
-H 'Accept: application/json' -u username:password
Do note that you'll need to create a new JIRA User Server entry to create Crowd credentials (the username:password
parameter above) for your application to use in its REST API calls:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With