REST API update Comment to internal

Jay Chapani September 16, 2020

Is there a way I can update Jira Service Desk comments to internal using the rest API?

2 answers

1 accepted

0 votes
Answer accepted
Jay Chapani September 17, 2020

I found a way of using 

PUT /rest/api/3/issue/{issueIdOrKey}/comment/{id}

Sample payload:

{
"body": {
"version": 1,
"type": "doc",
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "This is a public comment"
}
]
}
]
},
"properties": [
{
"key": "sd.public.comment",
"value": {
"internal": true
}
}
]
}
0 votes
Josep Maria Cao Garcia
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!
April 13, 2021
def body = """{
"body": {
"type": "doc",
"version": 1,
"content": [{
"type": "paragraph",
"content": [{
"text": "examaple",
"type": "text"
}]}]},
"properties": [{
"key": "sd.public.comment",
"value": {
"internal": true
}}],
"visibility": {}}"""

put ("/rest/api/3/issue/{issueKey}/comment/{commendId}")
.header("Content-Type", "application/json")
.header("Accept", "application/json")
.body(body)
.asJson()

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events