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

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

REST API update Comment to internal

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

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
}
}
]
}
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
Site Admin
TAGS
Community showcase
Published in Jira Service Management

Security Advisory for Jira Service Management

On October 20, 2021, Atlassian published a security advisory for Jira Service Management. The full advisory is available at this link.  We've seen a number of questions already asking for...

269 views 1 2
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