Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

400 Bad Request for issue creation through REST API

Dmitry
Contributor
August 1, 2019

I am confronted with this problem for quite some time. I have two users with pretty much identical setup, both part of the same project, using the web interface without any visible issue. However, the API call to create an issue works only for one of them. The failing user gets very confusing errors:

"Field 'summary' cannot be set. It is not on the appropriate screen, or unknown."
"Field 'description' cannot be set. It is not on the appropriate screen, or unknown."
"Field 'priority' cannot be set. It is not on the appropriate screen, or unknown."
"Field 'customfield_10035' cannot be set. It is not on the appropriate screen, or unknown.

There is some kind of authorization/authentication issue completely unrelated to the error returned by the server. I know this because if I use junk authorization tokens, I get the same gibberish responses.

The user who fails to do the API call has no problem creating issues in that project through web pages. The email and tokens are good. What gives?

 

 

 

1 answer

1 accepted

1 vote
Answer accepted
Dmitry
Contributor
August 2, 2019

I found the reason, the access token has become invalid, I have no idea why. When I recreated new token, everything worked. But the actual problem is still here - the responses should not indicate errors related to the schema of JIRA projects. Incredibly confusing, wasted me tons of time to realize that problem is not in the fields setup but in the access token.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events