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 With Bash Edited

Good morning
I am using JIRA in my company.

I've been using JIRA to find out that there is an API and I'm testing it.

I tested using bash to automatically generate JIRA, and I was successful





api_data="{\"fields\":{\"project\":{\"key\":\"${project}\"},\"summary\":\"jira test\",\"description\": \"my description\",\"issuetype\":{\"name\":\"${issuetype}\"}}}"



curl -u "${jira_user}":"${jira_pw}" -w "<%{http_code}>" -H "Content-Type: application/json" https://${jira_server}/rest/api/2/issue/ -X POST --data "${api_data}"

The reason I leave an article is
Assignee can not be specified.



2 answers

0 votes


Do you mean, that you have some kind of error ,when you specify an assignee? What is the error?

api_data="{\"fields\":{\"project\":{\"key\":\"${project}\"},\"summary\":\"my summary\",\"description\": \"my description\",\"issuetype\":{\"name\":\"${issuetype}\"}}}"

Is there an option here to change the assginee?

Is this the right way?

You missed a couple of parenthises


api_data="{\"fields\":{\"project\":{\"key\":\"${project}\"},\"summary\":\"test\",\"description\": \"my description\",\"issuetype\":{\"name\":\"${issuetype}\"}}}"



[incle@incle jira]$ ./
./ line 17: unexpected EOF while looking for matching `"'
./ line 18: syntax error: unexpected end of file

Suggest an answer

Log in or Sign up to answer

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