/
Jira REST API

Jira REST API

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 here โ†’ ย Manage API tokens for your Atlassian account | Atlassian Support

Then use the following approach.

Using com.railsware.SmartChecklist.checklist issue property:

๐Ÿ”— Jira API reference

Set the checklist

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

Get the checklist

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


Using Checklists custom field

๐Ÿ”— Jira API reference

โ˜๐ŸผNOTE: customfield_10001 custom field id might be different on your instance. Make sure you use the correct one

Set the checklist

curl --request PUT \ --url 'https://your-domain.atlassian.net/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

Check an example implementationย withย ScriptRunner for Jira (Cloud)

ย 

Hope everything works for you! ๐Ÿš€

Related content

JQL Search
Read with this
Use Templates in Automations
Use Templates in Automations
Read with this
Add a Checklist Template on Issue Transition
Add a Checklist Template on Issue Transition
Read with this
Formatting Guide
Formatting Guide
Read with this
ScriptRunner for Jira
ScriptRunner for Jira
Read with this