Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

I am trying to add comment in jira issue using api.

raju.shanigarapu
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
May 19, 2023

Hi Team,

 

I am trying to add a comment in jira issue using curl as follows

curl -i -s -u raju.shanigarapu@mendix.com:<<password>> -X POST --data '{
"body": "'"$comment"'"
}' -H "Content-Type: application/json" https://mendix-appservices.atlassian.net/rest/api/latest/issue/CM-134/comment

but I get the following error:

 


HTTP/2 404
date: Fri, 19 May 2023 12:14:35 GMT
content-type: application/json;charset=UTF-8
server: AtlassianEdge
timing-allow-origin: *
x-arequestid: 415d6fd3b8b193ad911b57e1cbf15bfd
x-seraph-loginreason: AUTHENTICATED_FAILED
set-cookie: atlassian.xsrf.token=4f16847d-35fb-4ae5-8b47-c2a234046b61_33bd270bc62b958480338bddd0f0487b1dc03ab0_lout; path=/; SameSite=None; Secure
cache-control: no-cache, no-store, no-transform
x-content-type-options: nosniff
x-xss-protection: 1; mode=block
atl-traceid: 8f587092d0af15c4
report-to: {"endpoints": [{"url": "https://dz8aopenkvv6s.cloudfront.net"}], "group": "endpoint-1", "include_subdomains": true, "max_age": 600}
nel: {"failure_fraction": 0.001, "include_subdomains": true, "max_age": 600, "report_to": "endpoint-1"}
strict-transport-security: max-age=63072000; includeSubDomains; preload

{"errorMessages":["Issue does not exist or you do not have permission to see it."],"errors":{}}

 

 

however I am able to view the issue comment using URL 
https://mendix-appservices.atlassian.net/rest/api/latest/issue/CM-134/comment

can you help me on how can I perform this using curl and where am I exact wrong.

1 answer

1 vote
Sebastian Krzewiński
Community Champion
May 19, 2023

Hi @raju.shanigarapu 

 

Does you user have rights to add comment on this issue?

 

Regards,

Seba

raju.shanigarapu
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
May 19, 2023

HI @Sebastian Krzewiński 

I am able to comment on the story manually by logging into the browser.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
TAGS
AUG Leaders

Atlassian Community Events