Getting 400 bad request Project is required error while trying to create issue from postman

Anjani Doolla
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
May 23, 2024

Hi Team,

I am getting 400 bad request Project is required error while trying to create issue from postman  

Could you please help me to resolve this issue, attaching here payload and error screenshot:

JiraIssue.PNG

Payload : 

{
    "update": {
        "worklog": [
            {
                "add": {
                    "timeSpent""60m",
                    "started""2024-05-23T11:05:00.000+0000"
                }
            }
        ]
    },
    "fields": {
        "summary""Creating first ticket from API ",
        "project": {
            "id""OCTSAP"
        },
        "summary""something's wrong",
        "issuetype": {
            "id""10000"
        },
        "assignee": {
            "name""anjani"
        },
        "reporter": {
            "name""aravind"
        },
        "priority": {
            "id""High"
        },
        "labels": [
            "bugfix",
            "blitz_test"
        ],
        "timetracking": {
            "originalEstimate""10",
            "remainingEstimate""5"
        },
        "security": {
            "id"""
        },
        "versions": [
            {
                "id"""
            }
        ],
        "environment""DEV",
        "description""description",
        "duedate""2024-05-25",
        "fixVersions": [
            {
                "id"""
            }
        ],
        "customfield_20000""23/May/24 3:25 PM",
        "customfield_40000""this is a text field",
        "customfield_70000": [
            "jira-administrators",
            "jira-software-users"
        ],
        "customfield_60000""jira-software-users",
        "customfield_50000""this is a text area. big text.",
        "customfield_10000""23/May/24"
    }
}

1 answer

0 votes
Rudy Holtkamp
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 23, 2024

hi @Anjani Doolla  and welcome to the community,

The first thing I noticed is:

 "project": {
  "id""OCTSAP"
},

 If you replace "id", with "key" you should be fine. If you want to use the "id" (which is a number) you should first find it. Below is an example of how it is stored in Jira:

image.png

Here you can see that the id is 10035 and the key PM

Kind regards,
Rudy

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events