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.
The expected request body has the following format:
{ "mainIssue": "TEST-123", "additionalIssues": [ "TEST-456", "TEST-789" ], "remoteServerId": "d64382b9-8894-4890-aa60-9f53a4f2009d", "selectedPageId": "1234567", "selectedParentPageId": "2345678", "createLinkToPage": true, "fieldToStorePageId": "customfield_10100" }
The mainIssue
parameter is always required. The other parameters are only evaluated if the operation expects corresponding user input. If, e.g. a user has to select the parent page, the remoteServerId
and selectedParentPageId
parameters are required.
Responses
STATUS 200 - Returned if the operation was successful.
{ "messages": [ "Operation was successful." ] }
STATUS 400 - Returned if the operation was unsuccessful or if Issue Publisher is unlicensed.
{ "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.