Hi!
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
GET /rest/api/2/user/assignable/search
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
projectKeyOrId
.- an updated issue, by providing the
issueKey
.- to an issue during a transition (workflow action), by providing the
issueKey
and the transition id inactionDescriptorId
. You can obtain the IDs of an issue's valid transitions using thetransitions
option in theexpand
parameter 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.
https://company_name.atlassian.net/rest/api/2/user/assignable/search?project=SERVICEDESK
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:
Cheers,
Dario
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 ?
Cheers,
Maciej
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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:
https://NAME.atlassian.net/rest/api/3/search?jql=project%3DSERVICEDESK%20AND%20assignee%3DUSER
Let me know if this helps.
Cheers,
Dario
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.