Forums

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

Cannot Create Issue using CURL / POST

Kevin Morgan November 12, 2018

When attempting to use CURL to create a new issue in Jira, I am receiving an error 403. Specifically, I am getting this message:

HTTP/1.1 405 Method Not Allowed

Allow: GET, HEAD, OPTIONS, TRACE

So it seems that I am not allowed to POST. I am wondering if it is a permissions issue? Here is the command I am using:

curl -D- -u userName:apiToken -X POST --data { data } -H "Content-Type:application/json" https://domain.atlassian.net/jira/rest/api/2/issue/

And the "data" being sent is JSON, like this:

{
   "fields": {
      "project": {
         "key": "key"
      },
      "summary": "summary",
      "description": "description",
      "issuetype": {
         "name": "Bug"
      },
      "customfield_10200": "data"
   }
}

As noted, I created (and am using) an API Token to login.

1 answer

1 accepted

0 votes
Answer accepted
Alexey Matveev
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.
November 12, 2018
Alexey Matveev
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.
November 12, 2018
Kevin Morgan November 12, 2018

Thank you Alexey. I somehow never came across that documentation in all of my searches. That resolved my Error 405 problem. Now, I am getting another Error, but I will create a fresh post for that one.

Alexey Matveev
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.
November 12, 2018

You are welcome!

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events