Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Next challenges

Recent achievements

  • Global
  • Personal

Recognition

  • Give kudos
  • Received
  • Given

Leaderboard

  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Add Comment to Issue using JIRA API in Cloud..

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

0 votes
Hana Kučerová Community Leader Nov 15, 2019

Hi @vkalakuntla,

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.

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Opsgenie

Opsgenie and Amazon team up to launch new DevOps Guru integration - now available!

We’re proud to announce that our integration with Amazon DevOps Guru is now live. The Amazon and Opsgenie product teams have worked together to build a deep integration between Opsgenie and the new...

242 views 0 7
Read article

Community Events

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

Find an event

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

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you