How I get issue id of particular issue in Jira Service Desk?

Diksha Bhawnani January 9, 2019

I want to get issue id of particular issue by the help of any other field . With that issue id , I can add comments to that issue. 

1 answer

1 vote
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.
January 9, 2019

Hello,

I guess you use Jira Rest Api. You can get an issue id by executing this Rest method:

GET /rest/api/2/issue/{issueIdOrKey}

You can find the key of an issue in the issue view screen.

Diksha Bhawnani January 9, 2019

I don't want to view issue screen. Is there any other way to get only issue id as in my response? I am using curl command to create issue as :
curl --request POST \
--url 'https://myid.atlassian.net/rest/api/3/issue' \
--user username@domain.com:api_toke \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{

"fields": {
"project": {
"key": "SEC"
},
"issuetype" : {
"name" : "Incident"
},
"priority" : {
"name" : "Highest"
},
"components" : [{
"name" : "APE"
}],
"labels" : [
"Bugfix"
],

"summary": "Sample REST API.",
"description": {
"type": "doc",
"version": 1,
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "example bug report"
}
]
}
]
}
},
"properties": [
{
"key": "propertyKey",
"value": "propertyValue"

}
]
}'

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.
January 9, 2019

I edited your reply to erase all credentials.

Do you mean that when you create an issue, you do not get the issue id?

In documentation it is said that the issue id must be returned.

Diksha Bhawnani January 10, 2019

No, I am getting the issue id in my response. 
But in future , I wanna get issue-id back without using issue Key. Is there any curl command for that?

Edmund Neil February 25, 2020

@Diksha Bhawnanidid found a solution for that?

Suggest an answer

Log in or Sign up to answer