Given the GDP changes that are coming for cloud (https://developer.atlassian.com/cloud/jira/platform/deprecation-notice-user-privacy-api-migration-guide/), we are trying to use the v2 api to search for users using the "query" parameter (https://developer.atlassian.com/cloud/jira/platform/rest/v2/#api-api-2-user-search-get)
If I want to search for a known user with a known "displayName" of "Bob", how should the URL be formed? I've tried the following but only get HTTP 200 with no results (Insomnia client will encode reserved characters after the first "="):
https://<our cloud instance>/rest/api/2/user/search?query=displayName=Bob
https://<our cloud instance>/rest/api/2/user/search?query=displayName="Bob"
I think understand what you're trying to do here, but I don't believe there is a way to search only the displayName value on accounts at this time. The current rest documentation doesn't make this explicitly clear though, however when searching for user accounts via rest, using either the query or username parameters, the following attributes always get searched in the search process:
I can see why this would be potentially problematic when searching for a specific user. But at the very least you should be able to change your URL to be
https://<our cloud instance>/rest/api/2/user/search?query=Bob
to get back all the accounts that any of those attributes that start with that string.
Thanks. You might want to update the documentation with an example. This was extremely confusing / frustrating.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Fair point. I will create a documentation update request to help make this more clear. Thanks for reporting it.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello @Kevin Chen and @André Mens,
Just FYI, the documentation for the REST API endpoints needs indeed to be updated (especially the examples, some of them are missing the parameter/s) and some time ago I started creating the below documentation requests:
I believe the first one is addressing what discussed in this thread.
Cheers,
Dario
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello @Andy Heinzer
Shall we use the get user API without username, query parameters. Shall we call the API just like https://<our cloud instance>/rest/api/2/user/search?query=startAt=1&maxResults=1000 . This will return the first 1000 users?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Have you review the 3 documentation requests I liked above? I believe the answer to your question is in there:
- https://HOSTNAME/rest/api/latest/user/search?query=something@example.com
Otherwise, please provide a bit more context on what you are trying to achieve, I may have misunderstood the question :)
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.