Is there any way to get all users with specific status which are set in the board? I want to get all users with `status='service desk'` so I was trying
curl -D -u USERNAME:PASSWORD -X GET -H "Content-Type: application/json" https://company_name.atlassian.net/rest/api/2/user/assignable/search?project=SERVICEDESK
But it doesn't worked, is there any way to do so using username and password instead of token?
Hi @maciej.wicher ,
I have difficulties understanding what you are trying to achieve. Specifically I am not sure I understand:
get all users with specific status which are set in the board
Can you kindly provide more details on what you are trying to do (screenshots are welcome) so that I can try to assist?
For the rest, looking at the provided REST API call:
Find users assignable to issues
Returns a list of users that can be assigned to an issue. Use this operation to find the list of users who can be assigned to:
- a new issue, by providing the
- an updated issue, by providing the
- to an issue during a transition (workflow action), by providing the
issueKeyand the transition id in
actionDescriptorId. You can obtain the IDs of an issue's valid transitions using the
transitionsoption in the
expandparameter of Get issue.
In all these cases, you can pass an account ID to determine if a user can be assigned to an issue. The user is returned in the response if they can be assigned to the issue or issue transition.
curl -D -u EMAIL_ADDRESS:API_TOKEN -X GET -H "Content-Type: application/json" https://company_name.atlassian.net/rest/api/2/user/assignable/search?project=PROJECT_KEY
For more details please see:
Thanks for you answer @Dario B By user with specific status I mean user with specific role. I found an answer how to do that here - https://community.atlassian.com/t5/Answers-Developer-Questions/List-of-users-in-project-REST-API/qaq-p/536820
But maybe you will give me a hint how to find all issues for specific project (key: servicedesk) assigned to specific user ?
Hi @maciej.wicher ,
You very are welcome :)
In order to search for all the issues for the specific project assigned to a specific user you can use the search endpoint, GET or POST methods (REST API v2 or v3):
The JQL you will have to pass as a URL argument or in the request body, depending on which method you decided to use, is the below one:
project = servicedesk AND assignee = USER
Therefore, for example, if going for the GET method you can call:
Let me know if this helps.
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