How to trigger an operation via the REST API
All requests to the Issue Publisher REST API need to be authenticated. For this create an API token and add the token as header to the request:
Authorization: Bearer <your API token>
To trigger an operation via the REST API, you can call the following URL:
POST https://issue-publisher.catworkx.de/rest/operation/{id}/perform
Replace {id}
with the UUID of the operation you want to trigger.
The expected request body has the following format:
{ "mainIssue": "TEST-123", "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.
{ "messages": [ "Error while performing operation." ] }
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 you can perform on an issue by calling the following URL:
GET https://issue-publisher.catworkx.de/rest/operation/for-issue/{issue}
Replace {issue}
with the key or ID of the issue.
How to get the UUID of a remote server
You can retrieve the list of remote servers by calling the following URL:
GET https://issue-publisher.catworkx.de/rest/remote-server
The returned list contains all remote servers (with the connectionType custom
).
An API token with the role Administrator is needed for this call.