getUsers() for api version 2#362
Open
Just-Web-Developer wants to merge 2 commits intojira-node:masterfrom
Open
getUsers() for api version 2#362Just-Web-Developer wants to merge 2 commits intojira-node:masterfrom
Just-Web-Developer wants to merge 2 commits intojira-node:masterfrom
Conversation
Fix of function "getUsers" for api version 2
Seth10001
requested changes
Dec 31, 2023
src/jira.js
Outdated
| getUsers(startAt = 0, maxResults = 100) { | ||
| return this.doRequest(this.makeRequestHeader(this.makeUri({ | ||
| pathname: '/users', | ||
| pathname: this.apiVersion === '2' ? '/user/search' : '/users', |
Contributor
There was a problem hiding this comment.
/rest/api/2/user/searh appears to be an alias for /rest/api/2/users: https://developer.atlassian.com/cloud/jira/platform/rest/v2/api-group-users/#api-rest-api-2-users-get
This change shouldn't be needed? Could you provide some more context?
Author
There was a problem hiding this comment.
/rest/api/2/users doesn't worked for a local copy of Jira, but /rest/api/2/user/searh worked well. Now, I checked it with cloud Jira and got the opposite result, /rest/api/2/user/searh doesn't work but /rest/api/2/users do. Maybe it would be usefull to add an additional parameter that would indicate whether the request sent to a local Jira or not.
Added "local" an additional parameter that would indicate whether the request sent to a local Jira or not.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Added compatiblity of function "getUsers" with api version 2