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.
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.
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"
}
]
}'
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.