Forums

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

WARNING: Remote Server Response: The remote server returned an error: (400) Bad Request.

Kim Kongsted August 20, 2021

Hi,

I have this PowerShell solution. It has been creating tasks daily with the following information below.

Everything has been working like a charm.

But now, i'm unable to create new tasks :-(

We are running version: v8.13.7

I only get this message: (400) Bad Request.

I have no clue how to identify the issue.

Is there a way for me get a proper error message telling me what's the issue?

My guess is that the company have done some kind of update, and now some logic have changed.

 

URL:

https://jira.xxx.com/rest/api/2/issue

 

Header:
verify false
Authorization Basic QzAxNjdfgsdf3r34f45f4rf

 

Body (Sample):
{
"fields": {
"issuetype": {
"name": "Task"
},
"description": "xxx",
"customfield_11506": "BDxxxx",
"assignee": {
"name": "BExxxx"
},
"priority": {
"name": "Major"
},
"summary": "XXX",
"project": {
"key": "SARSOL"
}
}
}

1 answer

1 vote
Charlie Misonne
Community Champion
August 20, 2021

Hi Kim,

A possibility is that someone configured a filed as mandatory on the Jira side and you're not including that field in the request.

In the REST documentation you will see a example of a 400 response with a response body where the field priority is required. mandatory: https://docs.atlassian.com/software/jira/docs/api/REST/8.13.7/#api/2/issue-createIssue

Are you getting a response body with extra info? If you are not here are some ideas:

  • Try creating an issue in the same project with the same values in the UI and check if that works
  • Check the Jira logs right when you try to create the issue via the REST API or ask a server admin to check it for you

Suggest an answer

Log in or Sign up to answer