The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 
  • Community
  • Q&A
  • Jira
  • Questions
  • Jira Rest API :: Empty response is return if we Find users by invalid username / invalid accountId

Jira Rest API :: Empty response is return if we Find users by invalid username / invalid accountId

AppConnect
April 8, 2020

Hi,


We are trying to develop an application using JIRA Rest APIs.

We are trying to find user by username/accountId.

But if we provide invalid username/accountId, instead of error we are getting empty array with statusCode 200.

Is there any way to trace the error as this is not valid behavior and user might not able to trace out whether the request is successful or not.

Instance : On Cloud

Following is the req:

var options = {
'method': 'GET',
'url': '{{host}}/rest/api/2/user/search?username=invaliduser',
'headers': {
'Accept': 'application/json',
'Content-Type': 'application/json',
'Authorization': Basic username:password
}
};

 

Following response is getting from endpoint:

StatusCode : 200

Body: []

 

Note : API behavior is same for OnPrem instance

0 answers

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

TAGS
AUG Leaders

Atlassian Community Events