Forums

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

Mandatory parameter for payload in REST API post request

Naveen Joseph Gabriel February 19, 2023

I am trying to create an issue from JIRA rest API .  I am getting 415 error which I  understood is a bad payload.

Below is the payload I am passing right now :

 

payload = json.dumps({

    "fields": {

      "project": {

      "key""Project Key"

    },

      "summary""Modification in front end",

      "description": {

      "content": [

        {

          "content": [

            {

              "text""Order entry fails when selecting supplier.",

              "type""text"

            }

          ],

          "type""paragraph"

        }

      ],

      "type""doc",

      "version"1

    },

      "issuetype": {

      "name""Bug"

       },

    "reporter": {

      "id""6017b01d332636006a6a15d9"

    }

    },

     "update": {}

})

1 answer

0 votes
Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 19, 2023 edited

Hi @Naveen Joseph Gabriel 

I suspect you have some unnecessary content in that expression, so perhaps prune it down to the minimum and then add back in what you need once it is working.  Please take a look at this example for the syntax for setting some of the fields you reference in your code.

https://blog.developer.atlassian.com/creating-a-jira-cloud-issue-in-a-single-rest-call/ 

Kind regards,
Bill

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
TAGS
atlassian, out of office, loom, confluence, async collaboration, meeting recaps, remote teamwork, team alignment, knowledge sharing, AI-powered notes, productivity tools, workforce continuity, teamwork collection

Put your meeting notes on autopilot with Loom + Confluence

AI-powered meeting notes keep work moving even if you’re out of the office. Enjoy your well-deserved time off and return refreshed, confident you’ll catch up in no time.

Learn more
AUG Leaders

Atlassian Community Events