How to trigger an operation via the REST API

Previous to version 12.0.0 of the Issue Publisher you could perform any operation via the REST API. Since version 12.0.0 you specifically need to configure the trigger REST API for the operation.

To trigger an operation via the REST API, you can call the following URL:

POST <base URL>/rest/issue-publisher/1.0/operation/{id}/perform

Replace <base URL> with your Jira's base URL and {id} with the UUID of the operation you want to trigger.

New body format (since version 14.0.0)

The expected request body has the following format:

Body
{
    "mainIssue": "TEST-123",
    "userInput" : {
        "additionalIssues": [ "TEST-456", "TEST-789" ],
        "selectedParentPage": {
            "remoteServerId": "d64382b9-8894-4890-aa60-9f53a4f2009d",
            "pageId": "2345678"
        },
        "pageTitle": "My new page",
        "createLinkToPage": true,
        "fieldToStorePageId": "customfield_10100"
    }
}

The mainIssue parameter is always required. The userInput block should contain the user inputs with their variable names as identifier.

Legacy body format

The only supported format for versions up to 13.6.0 and still accepted in version 14.0.0 and newer, but it will only work with the below parameter names and their corresponding default variable names. E.g. the parameters selectedParentPageId and remoteServerId are mapped to the user input with the variable name selectedParentPage.

Body
{
   "mainIssue": "TEST-123",
   "additionalIssues": [ "TEST-456", "TEST-789" ],
   "remoteServerId": "d64382b9-8894-4890-aa60-9f53a4f2009d",
   "selectedPageId": "1234567",
   "selectedParentPageId": "2345678",
   "createLinkToPage": true,
   "fieldToStorePageId": "customfield_10100"
}

Responses

STATUS 200 - Returned if the operation was successful.

Example
{
   "messages": [ "Operation was successful." ]
}

STATUS 400 - Returned if the operation was unsuccessful or if Issue Publisher is unlicensed.

Example
{
   "messages": [ "Error while performing operation, see log for details." ]
}

STATUS 403 - Returned if the current user is not allowed to perform the operation on the given issue.

STATUS 404 - Returned if there is no operation with the given UUID.

How to get the UUID of an operation

You can retrieve the list of operations by calling the following URL:

GET <base URL>/rest/issue-publisher/1.0/operation

The returned list of operations contains all operations, but you can only perform those that have a corresponding REST API trigger.

Only administrators can call this URL.

How to get the UUID of a remote server

You can retrieve the list of remote servers by calling the following URL:

GET <base URL>/rest/issue-publisher/1.0/remote-server

The returned list contains all application links (with the connectionType app_link) and custom remote servers (with the connectionType custom).

Only administrators can call this URL.