Manage Options via Integration (web requests)
This guide will walk you through the process of creating, updating, deleting, and retrieving options using the provided “API”. This API is designed to manage options for custom fields in Jira. The endpoints require an API key for authentication. Below are detailed steps for each operation.
Table of Contents
Setup
API Key:
The API uses a stored API key for authentication. Make sure the API key is stored.
For that, go to Manage apps → 3+ Levels Cascade Fields → Configure
Then go to “Integration” Tab. There you will see your endpoints + API Key
Endpoints Overview
Attention in this part, Forge apps can’t have a direct URL or API.
All the URLS provided are different, so don’t map all functions to the same domain.
GET Options: Retrieve options for a given field. The URL will be provided to you in the Storage tab
GET URL?apiKey=<yourApiKey>
CREATE Options: Create multiple options for a given field.
POST URL?apiKey=<yourApiKey>
UPDATE Options: Update multiple options for a given field.
POST URL?apiKey=<yourApiKey>
DELETE Options: Delete multiple options for a given field.
Creating Options
Endpoint:
POST URL?apiKey={apiKey}
Request Body:
Required
fieldId: str
options: array
id: str, value: str, parentId: strExample cURL Command:
Response:
Updating Options
Endpoint:
POST TheURL?apiKey={apiKey}
Request Body:
Optional
fieldId: str
options: array
id: str, value: str, parentId: str, enabled: boolExample cURL Command:
Response:
Deleting Options
Endpoint:
POST TheURL?apiKey={apiKey}
Request Body:
Required
fieldId: str
id: strExample cURL Command:
Response:
Retrieving Options
Endpoint:
GET TheUrl?apiKey={apiKey}
Request Body:
Required
fieldId: strExample cURL Command:
Response:
Error Handling
Invalid API Key:
Invalid JSON Format:
Required Keys Missing:
This guide should provide a comprehensive overview of how to create, update, delete, and retrieve options using the provided API endpoints. Make sure to replace placeholder URLs and API keys with your actual values.