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

Checkboxes through the REST-API Edited


i try create some confluence pages through the REST-API. It's working with bold, sections etc very well, but checkboxes like this is a little trouble.

Screenshot_2020-01-30 System 20 1 - APP Program - Confluence ITS.png


With the editor, its very easy using these brackets: []. But through the REST-API this is not possible, the will shown as plain text. Is there any solution for sending checkboxes through the API? i know its possible with the tasklist-macro, but if its possible i want to use the normal checkboxes.




1 answer

A single checkbox will have only two values: on or off.

If you set the customfield's value to nothing (null) it will turn off.
If you set the customfield's value to Y, it will turn on, as in...

{ "fields" : { "customfield_12345" : { "value" :"Y" } } }

Ignore my answer above. I just realised you are asking a question about a Confluence page, not a Jira issue.

You can't alter a single checkbox on a Confluence page. You'd have to use the REST API to download the page content in HTML format, search for the checkbox you want to change, change its status from incomplete to complete, then upload the whole page of HTML back to Confluence to apply the change.

Here's a sample of the HTML for a task list with two tasks, one complete (ticked), one incomplete (un-ticked):

<span class="placeholder-inline-tasks">task is complete</span>
<span class="placeholder-inline-tasks">task is incomplete</span>


Suggest an answer

Log in or Sign up to answer
Community showcase
Posted in Confluence

Lessons and Learnings: Six Months of Working Remote [Discussion]

Hey there, folks! For most of us, the past six months- yes, you read that right- have been a journey. More people than ever before have pivoted to working remotely, and navigating being on-scre...

5,964 views 4 6
Join discussion

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