Table of contents
...
Our plugin allows you to change it's data via Atlassian API. We use the properties of the issue so you can get, update, delete or create data outside of the plugin UI.
You can preview the data by making a GET request to: https://{ site-url }.atlassian.net/rest/api/
...
2/issue/{ issue.id }/properties/sd-checklists
POST requests are also made to the same endpoint.
...
https://{ site-url }.atlassian.net/rest/api/32/issue/{ issue.id }/properties/sd-checklists - read/update/delete the checklist
...
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
curl -u { your email }:{ your API token } https://{ site-url }.atlassian.net/rest/api/32/issue/{ issue.id }/properties/sd-checklists |
...
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
curl -X PUT -H "Content-Type: application/json" -u { your email }:{ your API token } https://{ site-url }.atlassian.net/rest/api/32/issue/{ issue.id }/properties/sd-checklists -d '{ "version":"1.0.0", "checklists":[ { "id":0, "name":"Example to do", "items":[ { "name":"<p>task 1</p>", "required":true, "completed":true, "status":0, "user":"{ user id }", "date":"2019-08-13T13:18:24.046Z" }, { "name":"<p>task 2</p>", "required":false, "completed":true, "status":0, "user":"{ user id }", "date":"2019-08-13T13:18:44.988Z" }, { "name":"<p>task 3</p>", "required":false, "completed":false, "status":0, "user":"{ user id }", "date":"2019-08-08T13:30:29.643Z" } ] } ] }' |
...
Code Block | ||||
---|---|---|---|---|
| ||||
curl -X PUT -H "Content-Type: application/json" -u { your email }:{ your API token } https://{ site-url }.atlassian.net/rest/api/32/issue/{ issue.id }/properties/sd-checklists -d '{}' |
...