API

This document provides instructions on how to use our API to manage a cascade field, including how to read, add, update, and delete options.

To begin, navigate to the “Integration” tab on the app’s configuration page. There, you will find your current API key and the request links for each operation.

image-20240819-151831.png

If needed, you can generate a new API key. Please note that generating a new key will immediately invalidate the previous one.

 

Below are the guidelines for structuring API requests.

Get Options

Returns the options available in a cascade field.

The field is identified by its internal ID and is specified in the body of the request. If a matching field is found its details are returned.

 

 

Request

curl --location --request GET 'https://c0eb368e-1a2d-4395-b903-73c518cc3b1e.hello.atlassian-dev.net/x1/jc-Huc4NYOAffktJrYG4yAzR5r0?apiKey=<YOUR_API_KEY>' \ --header 'Content-Type: application/json' \ --data '{ "fieldId": "customfield_10095" }'

Response

[ { "id": "1", "value": "North America", "enabled": true, "parentId": "0" }, { "id": "2", "value": "California", "enabled": true, "parentId": "1" } ]

Create Options

Creates new options in existing fields.

The field is identified by its internal ID and is specified in the body of the request, as well as the new options to be added in the field.

One or more options can be created at a time.

If a matching field is found and te options don’t conflict with existing options IDs, a success message is detailed and returned.

Request

curl --location 'https://c0eb368e-1a2d-4395-b903-73c518cc3b1e.hello.atlassian-dev.net/x1/RsQfFVidouk1GQguGG1eLZ4Pa8Y?apiKey=<YOUR_API_KEY>' \ --header 'Content-Type: application/json' \ --data '{ "fieldId": "customfield_10095", "options": [ { "value": "South America", "id": "8", "parentId": "0" } ] } '

Response

Update Options

Updates already existing options in a field. The field is identified by its internal ID and is specified in the body of the request.

One or more options can be updated at a time.

If a matching field is found, as well as matching options, a success message with details is returned.

Request

Response

Delete Options

Deletes options from a specified list.

With a field specified in the body, as well a list of options, returns the list of options deleted and a success message.

Options must be formatted as strings in the JSON body.

Request

Response