...
You can link a document or folder to a Jira issue by creating a remote link for that issue. This can be done via Jira REST API.
Request URL
The request URL takes the following form:
POST <ROOT>/rest/api/latest/issue/{issueIdOrKey}/remotelink
Replace "<ROOT>" with the base URL of your Jira server.
Parameters
You have to specify the following parameters:
...
In this example, the document with the key (id) 519 is linked to an issue. To link a document or folder, just replace '519' with the key (id) of the document or folder than you want to link.
A successful response
An HTTP 200 status response indicates a successful request.
Error Response
If the REST call fails, the service returns one of the following HTTP statuses:
...