Forums

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

JIRA Cloud V3 API: Issue creating comment

Phil_Dimeski
Contributor
November 14, 2018

Hey there, 

I am updating the all of my API endpoints to v3 and noticed something that was not expected when creating a comment. In the documentation the the add Comment endpoint the different for both API versions:

V2

 

body

string

The comment.



V3

body

anything

The comment.

 

 

When I assign the body field as a string using the V2 API it works all good. When I assignee the body field as a string in V3 I get the following error:

 {"errorMessages":[],"errors":{"comment":"Comment body is not valid!"}} 

 

Has something changed that the API document is not outlining? 

 

Cheers, Phil 

 

3 answers

0 votes
Albert Cavalcante
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!
July 31, 2020

This problem was solved? I´m in the same situation right now.

0 votes
Deleted user June 18, 2020
0 votes
Phil_Dimeski
Contributor
November 14, 2018

Also seems like the JSON payload returned for get issue has changed in V3. The description field is nested without other fields:

V2

"description": "example bug report",

 

V3

    "description": {
      "type": "doc",
      "version": 1,
      "content": [
        {
          "type": "paragraph",
          "content": [
            {
              "type": "text",
              "text": "example bug report"
            }
          ]
        }
      ]
    },

 

Is there any reference to these changes?

Kamal Sahoo
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!
October 12, 2022

Thank you. This solved my problem.

Like • 2 people like this

Suggest an answer

Log in or Sign up to answer