Want to know the step by step process to create issue on JIRA from unix ?

I am new to JIRA need suggestion

Want to know the step by step process to create issue on JIRA from unix and whats are the requirements like what are the software,api, jar need to be installed or present on machine.... etc

 

1 answer

1 accepted

You do not require anything more than a CURL to create a Jira Issue from your remote machine.

You can use this request

https://servername:port/rest/api/2/issue is the URI you should hit.

The data portion is a bit complex, you can remove few fields which you are not interested in.

{
"fields": {
"project": {
"id": "10000"
},
"summary": "something's wrong",
"issuetype": {
"id": "10000"
},
"assignee": {
"name": "homer"
},
"reporter": {
"name": "smithers"
},
"priority": {
"id": "20000"
},
"labels": [
"bugfix",
"blitz_test"
],
"timetracking": {
"originalEstimate": "10",
"remainingEstimate": "5"
},
"security": {
"id": "10000"
},
"versions": [
{
"id": "10000"
}
],
"environment": "environment",
"description": "description",
"duedate": "2011-03-11",
"fixVersions": [
{
"id": "10001"
}
],
"components": [
{
"id": "10000"
}
],
"customfield_30000": [
"10000",
"10002"
],
"customfield_80000": {
"value": "red"
},
"customfield_20000": "06/Jul/11 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": "09/Jun/81"
}
}

Your request may depend on the version of Jira you are using. Please check the documentation. createIssue

I will recommend you to try this with Postman first before using Curl.

See the below example of a simple curl get request to Service desk, your request will also be no different from this except you use POST and add more headers with data.

curl -H "X-ExperimentalApi: true" -u user:pwd -X GET "http://myserver.com:8080/rest/servicedeskapi/servicedesk?start=0&limit=5" | python -mjson.tool

Thanks for you reply

this question is bit silly... do JIRA needs to be installed on remote machine? where we goning to running our curl command.

another question

I tried postman.. I created basic JIRA account here at logged in https://jira.atlassian.com/

On postman in POST https://jira.atlassian.com/rest/api/2/issue/ and 

 

username password and json 

{
"fields": {
"project":
{
"key": "TST"
},
"summary": "Test API",
"description": "Test description",
"issuetype": {
"name": "Task"
}
}
}

 

but getting 401.

Is my url correct in POST?

You do not need any local instance of JIRA to create an Issue. You can do it from anywhere provided you have the API access.

I think Postman errors are mostly self explainatory. Please provide proper headers and give a try. I think you havent authorized properly give your credentials in the header to deal with 401.

Hi Ashish,

If you think the comments helped you, Please mark as a correct answer and vote.

Thanks in advance.

Shasi

Suggest an answer

Log in or Join to answer
Community showcase
Sarah Schuster
Posted Jan 29, 2018 in Jira

What are common themes you've seen across successful & failed Jira Software implementations?

Hey everyone! My name is Sarah Schuster, and I'm a Customer Success Manager in Atlassian specializing in Jira Software Cloud. Over the next few weeks I will be posting discussion topics (8 total) to ...

2,899 views 12 18
Join discussion

Atlassian User Groups

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

Find a group

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

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot