Hi,
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.
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.
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):
<ac:task-list>
<ac:task>
<ac:task-id>1</ac:task-id>
<ac:task-status>complete</ac:task-status>
<ac:task-body>
<span class="placeholder-inline-tasks">task is complete</span>
</ac:task-body>
</ac:task>
<ac:task>
<ac:task-id>2</ac:task-id>
<ac:task-status>incomplete</ac:task-status>
<ac:task-body>
<span class="placeholder-inline-tasks">task is incomplete</span>
</ac:task-body>
</ac:task>
</ac:task-list>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.