Problem
When I try and search the API with this call it doesn't work. I've tried using double quotes, single quotes, percent, dot, underscores, and other ideas to get it to run, but no luck.
This should give me users in that project, right?
https://yourinstance.atlassian.net/rest/api/latest/user/search?jql=project=BM
{
"errorMessages": ["The username or property query parameter must be provided"],
"errors": {}
}
--
I have also tried:
https://yourinstance.atlassian.net/rest/api/latest/user/search?project=BM
https://yourinstance.atlassian.net/rest/api/latest/user/search?projectkey=BM
https://yourinstance.atlassian.net/rest/api/latest/user/search?'project in (BM)'
Additional Information
When I try and search the API with this call it does work, so I know the endpoint works, but I'm not sure how to get the search above to work.
https://yourinstance.atlassian.net/rest/api/latest/user/search?username=user.name
[
{
"self": "https://yourinstance.atlassian.net/rest/api/2/user?username=user.name",
"key": "",
"accountId": "",
"name": "",
"emailAddress": "",
"avatarUrls": {
"16x16": "",
"24x24": "",
"32x32": "",
"48x48": ""
},
"displayName": "",
"active": true,
"timeZone": "",
"locale": ""
}
]
Benjamin,
There isn't a way to retrieve users from a particular project like you are trying to do.
I would instead look to find the roles availible in a project using this api
/rest/api/2/project/{projectIdOrKey}/role
and then use those project roles to identify the users that occupy those roles.
rest/api/2/project/{projectIdOrKey}/role/{id}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello,
Are you sure that you use the correct Rest call in the first case? The rest/api/latest/user/search
call must return users and it does not take the jql parameter. Maybe you wanted to use /rest/api/2/search?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Alexey Matveev thanks for the reply, @Kian Stack Mumo Systems let me know it's not possible to retrieve users by project like I was trying to do.
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.