API usage in Jira automation

Example of an automation rule: Automatically create an External Share link for every new issue.

1.In the External Share global settings go to the “API Keys” tab and click the “Create new API key” button


2. In the popup window set

Create Shares: “Allow”. Save the key value. It will be needed in the further step.


3.Go to the project settings-

Automation tab and click the “Create Rule” button


4.Choose the “Issue Created” trigger


5.Add component “New action” and choose “Send web request”


6.Fill in fields:

  • web request URL: https://jira.external-share.com/webapi/share

  • headers:

    • Authorization: 'Bearer { KEY_VALUE }' (key value from the second step)

    • Content-Type: 'application/json

  • HTTP method: POST

  • Web request body: Custom Data and fill in the field with request body (here you can pass additional fields like expiration, password, allow comments, attachments etc )


Save. Turn on the rule. Every new issue will have automatically created an External Share link.