Jira REST API. Read/Write checklists

You can use Jira REST API to work with the checklists.

Overview

You can read/write checklists by accessing any of checklist storage:

Authentication

Get your API token from https://id.atlassian.com/manage/api-tokens  check out instructions: https://confluence.atlassian.com/cloud/api-tokens-938839638.html

Then use the following approach

Examples

Using com.railsware.SmartChecklist.checklist issue property

Jira API reference

Set the checklist

1 2 3 4 5 6 curl --location --request PUT \ --url 'https://your-domain.atlassian.com/rest/api/2/issue/{issueIdOrKey}/properties/com.railsware.SmartChecklist.checklist' \ --user 'email@example.com:<api_token>' \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --data '"- ToDo List\n+ Checked\nx Skipped\n~ In Progress\n"'

Get the checklist

1 2 3 4 5 curl --request GET \ --url 'https://your-domain.atlassian.com/rest/api/2/issue/{issueIdOrKey}/properties/com.railsware.SmartChecklist.checklist' \ --user 'email@example.com:<api_token>' \ --header 'Accept: application/json' \ --header 'Content-Type: application/json'

 

Using “Checklists” custom field

Jira API reference

customfield_10001 custom field id might be different on your instance. Make sure you use the correct one.

Set the checklist

1 2 3 4 5 6 7 8 9 10 curl --request PUT \ --url 'https://your-domain.atlassian.com/rest/api/2/issue/{issueIdOrKey}' \ --user 'email@example.com:<api_token>' \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --data '{ "fields": { "customfield_10001": "- ToDo List\n+ Checked\nx Skipped\n~ In Progress\n" } }'

Get the checklist

Your curl request

1 2 3 4 5 curl --request GET \ --url 'https://your-domain.atlassian.com/rest/api/2/issue/{issueIdOrKey}' \ --user 'email@example.com:<api_token>' \ --header 'Accept: application/json' \ --header 'Content-Type: application/json'

Response from server

1

 

 

Check an example implementation with ScriptRunner for Jira (Cloud)