The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

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

Add Comment to Issue using JIRA API in Cloud..

Deleted user
November 15, 2019

Hi All,

I am trying to add the comment to Issue using JIRA API with the below URL :

JiraServerUrl/api/3/issue/{IssueKey}/Comment (This is for Jira Cloud)  But unable to add the same .. and getting "The remote server returned an error: (400) Bad Request"

when i try using this one JiraServerUrl/api/2/issue/{IssueKey}/Comment) - able to add the comment.

below Json request i am using in my code for both:

object json = new
{
    body = "This is comment from JIRA API.."
};

Can anyone have an idea on the same? Pls suggest..

 

1 answer

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

0 votes
Answer accepted
Hana Kučerová
Community Champion
November 15, 2019

Hi @[deleted],

according to the documentation the request body looks different for Jira Cloud:

https://developer.atlassian.com/cloud/jira/platform/rest/v3/#api-rest-api-3-issue-issueIdOrKey-comment-post

That's why you get error code 400 - Jira wasn't able to obtain comment text from your provided JSON.

TAGS
AUG Leaders

Atlassian Community Events