As described in the summary - I am using ScriptRunner. Here is the code I am trying to run:
def commentBody = [
"type": "doc",
"version": 1,
"content": [
"type": "paragraph",
"content": [
"type": "text",
"text": "The group could not be created. Response:"
]
]
]
post("/rest/api/3/issue/GS-1/comment")
.basicAuth(SERVICE_USER, SERVICE_API_TOKEN)
.header("Accept", "application/json")
.header("Content-Type", "application/json")
.body(commentBody)
.asJson()
Here is the response:
POST request to /rest/api/3/issue/GS-1/comment returned an error code: status: 400 - Bad Request
body: {"errorMessages":[],"errors":{"comment":"Comment body can not be empty!"}}
I followed ADF documentation here: https://developer.atlassian.com/cloud/jira/platform/apis/document/structure/
Any idea where the problem could be?
Thanks!