Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Note

You need administrator rights in Jira to perform the tasks on this page.

Info

To improve readability, all JSON results will be beautified, whereas the actual results will not.

Special notes for default local items

As opposed to most ID-based systems, default local item IDs start at -1 and decrement as more items are added.

When all items are cleared, the IDs start back at -1.

Whenever you need to update a default local item, we suggest that you get all default local items and filter them to determine which item ID you should use.

Request URI

The base request URI for all APIs on this page is as follows:

Code Block
{JIRA Instance}/rest/com.okapya.jira.checklist/latest/checklists/configuration/{FieldConfigId}/defaultlocalitems
Info

See https://okapya.atlassian.net/wiki/spaces/CHKDOC5/pages/2940666209/Configuring+checklists+using+REST+APIs#Base-configuration-path for more help with the Request URI.

APIs

Create

Status
colourPurple
titlePOST
[...]/defaultlocalitems

You can create a new global item in the field configuration.

 

Description

Example

Request

A JSON representation of the item to create.

The JSON can be simplified to only include the necessary fields for creation such as the name.

Info

Specifying a rankvalue will insert the item at that specific rank.

Ranks are zero-based.

Code Block
{"name":"All tests clear"}

or

Code Block
{"name":"All tests clear", "statusId":"blocked"}

Response

Returns the full JSON representation of the newly created item.

Code Block
languagejson
{
  "id": -1,
  "name": "All tests clear",
  "mandatory": true,
  "rank": 0,
  "statusId": "none",
  "dueDate": null,
  "isHeader": false,
  "checked": false,
  "priorityId": null,
  "globalItemId": 0,
  "version": "5.0",
  "assigneeIds": []
}
Obtain

Get all items

Status
colourGreen
titleGET
[...]/defaultlocalitems

You can obtain get all global items included in the path’s field configuration, with the option to exclude disabled items.

 

Description

Example

Response

Returns the full JSON representation of the list of default local items.

Code Block
languagejson
[
  {
    "id": -1,
    "name": "All tests clear",
    "mandatory": true,
    "rank": 0,
    "statusId": "none",
    "dueDate": null,
    "isHeader": false,
    "checked": false,
    "priorityId": null,
    "globalItemId": 0,
    "version": "5.0",
    "assigneeIds": []
  },
  {
    "id": -2,
    "name": "Deployed to production",
    "mandatory": true,
    "rank": 1,
    "statusId": "none",
    "dueDate": null,
    "isHeader": false,
    "checked": false,
    "priorityId": null,
    "globalItemId": 0,
    "version": "5.0",
    "assigneeIds": []
  }
]
Obtain

Get a single item

Status
colourGreen
titleGET
[...]/defaultlocalitems/{defaultLocalItemId}

By providing a default local item ID, you can obtain get the contents of a single default local item.

 

Description

Example

Response

Returns the full JSON representation of the requested default local item.

Code Block
languagejson
{
  "id": -2,
  "name": "Deployed to production",
  "mandatory": true,
  "rank": 1,
  "statusId": "none",
  "dueDate": null,
  "isHeader": false,
  "checked": false,
  "priorityId": null,
  "globalItemId": 0,
  "version": "5.0",
  "assigneeIds": []
}

Update an item

Status
colourYellow
titlePUT
[...]/defaultlocalitems/{defaultLocalItemId}

You can update the specified default local item’s content.

 

Description

Example

Request

A JSON representation of the fields to update, including their values.

To keep updating simple, you only have to list the fields and values you want to update.

Info

Specifying a rankvalue will move the item at that specific rank.

Ranks are zero-based.

Code Block
languagejson
{"mandatory":false}

or

Code Block
languagejson
{"mandatory":false, "checked":true}

 

Response

Returns the full JSON representation of the updated default local item.

Code Block
languagejson
{
  "id": -2,
  "name": "Deployed to production",
  "mandatory": false,
  "rank": 1,
  "statusId": "none",
  "dueDate": null,
  "isHeader": false,
  "checked": true,
  "priorityId": null,
  "globalItemId": 0,
  "version": "5.0",
  "assigneeIds": []
}

Delete

Status
colourRed
titleDELETE
​[...]/defaultlocalitems/{defaultLocalItemId}

You can delete a default local item in the field configuration. This API doesn’t provide a response.

Exceptions

For the list of potential exceptions, see https://okapya.atlassian.net/wiki/spaces/CHKDOC5/pages/2940666327/Exceptions+for+configuration+REST+APIs#Default-local-items-exceptions.


Status
titleSERVER DOCUMENTATION
(On Cloud? Go here.)
Have questions? Contact our Service Desk for help anytime.