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

  1. Setup

  2. Endpoints Overview

  3. Creating Options

  4. Updating Options

  5. Deleting Options

  6. Retrieving Options


Setup

  1. API Key:

    • The API uses a stored API key for authentication. Make sure the API key is stored.
      For that, go to Manage apps3+ Levels Cascade FieldsConfigure
      Then go to “Integration” Tab. There you will see your endpoints + API Key


      Screenshot 2024-07-31 at 01.17.42.png

       

  2. 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

  1. Endpoint: POST URL?apiKey={apiKey}

  2. Request Body:

    Required
    fieldId: str
    options: array
    id: str, value: str, parentId: str


  3. Example cURL Command:

  4. Response:

Updating Options

  1. Endpoint: POST TheURL?apiKey={apiKey}

  2. Request Body:

    Optional
    fieldId: str
    options: array
    id: str, value: str, parentId: str, enabled: bool

  3. Example cURL Command:

  4. Response:

Deleting Options

  1. Endpoint: POST TheURL?apiKey={apiKey}

  2. Request Body:

    Required
    fieldId: str
    id: str

  3. Example cURL Command:

  4. Response:

Retrieving Options

  1. Endpoint: GET TheUrl?apiKey={apiKey}

  2. Request Body:

    Required
    fieldId: str

  3. Example cURL Command:

  4. 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.