Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Next challenges

Recent achievements

  • Global
  • Personal

Recognition

  • Give kudos
  • Received
  • Given

Leaderboard

  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

rest api link issue while creating issue

I'm trying to execute CURL command as shown in Jira documents for creating an issue.

I'm using the below command;

curl -D- -u a.b@c.com:myPassword -X POST -data data.txt -H "Content-Type: application/json" http://localhost:8088/rest/api/2/issue/

 

Content of data.txt is as below;

{"fields": {"project":{"key": "CRTQ"},"summary": "Test Summary","description": "This is description","issuetype": {"name": "Bug"}}}

 

Response received;

curl: (3) Port number ended with '\'
HTTP/1.1 400
X-AREQUESTID: 1049x1902x1
X-ASEN: SEN-L10016630
Set-Cookie: JSESSIONID=2599857A6C75D56F1800E2E1F7DB4034;path=/;HttpOnly
X-Seraph-LoginReason: OK
Set-Cookie: atlassian.xsrf.token=BOAQ-4XFZ-EQJV-2T2J|7658a261b648a3a465e0384170dcc1f34c52c016|lin;pa
th=/
X-ASESSIONID: 5wsb8e
X-AUSERNAME: ranjithcnair.in%40gmail.com
Cache-Control: no-cache, no-store, no-transform
X-Content-Type-Options: nosniff
Content-Type: application/json;charset=UTF-8
Transfer-Encoding: chunked
Date: Thu, 03 Aug 2017 11:59:25 GMT
Connection: close

{"errorMessages":["Unexpected character ('a' (code 97)): expected a valid value (number, String, arr
ay, object, 'true', 'false' or 'null')\n at [Source: org.apache.catalina.connector.CoyoteInputStream
@3af078d7; line: 1, column: 2]"]}

 

 

What am I missing or doing wrong?

1 answer

I think your curl command is malformed, try:

curl -i -u a.b@c.com:myPassword -X POST -d @data.txt -H "Content-Type: application/json" http://localhost:8088/rest/api/2/issue/

Suggest an answer

Log in or Sign up to answer
TAGS

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you