Forums

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

Error while trying to create an issue using jira api

cyril_kunjumon
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!
February 2, 2023

I am using jira api to create a new issue in my jira project using this request body


{

"fields": {

    "project": {

         "id": 1234

     },

    "summary": "Summary",

    "description": "",

     "issuetype": {

          "name": "Bug"

    },

    "priority": { 

         "name": "P3"

    },

    "customfield_10817": {

         "id": "1234"

    },

    "customfield_10767": {

         "id": "12343"

    },

    "reporter": {

        "accountId": "12345"

    },

    "customfield_10872": {

        "id": "12345"

    }

}

}

and i am getting this response

{

     "errorMessages": [

        "Please add Ticket Type"

     ],

    "errors": {}

}

I don't understand what is meant by Ticket Type because we are already mentioning the type of issue.

1 answer

0 votes
Vamsi Kandala
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 2, 2023

Hi @cyril_kunjumon

Welcome to the community!

Your JSON data looks fine.  If you don't mind, can you post the REST API call url here?  You can hide out the domain part if required.

Thanks,
Vamsi

cyril_kunjumon
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!
February 2, 2023

Hi @Vamsi Kandala ,

this is the url that i am using 

https://shipsy.atlassian.net/rest/api/2/issue
Vamsi Kandala
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 2, 2023

Hi @cyril_kunjumon

That is the correct API call.  I hope you are using the POST call and not the GET call.

Thanks,
Vamsi

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
TAGS
AUG Leaders

Atlassian Community Events