POST /rest/api/2/issueLink
Creates a link between two issues. Use this operation to indicate a relationship between two issues and optionally add a comment to the from (outward) issue. To use this resource the site must have Issue Linking enabled.
This resource returns nothing on the creation of an issue link. To obtain the ID of the issue link, use https://your-domain.atlassian.net/rest/api/2/issue/[linked issue key]?fields=issuelinks
.
If the link request duplicates a link, the response indicates that the issue link was created. If the request included a comment, the comment is added.
This operation can be accessed anonymously.
Permissions required:
- Browse project project permission for all the projects containing the issues to be linked,
- Link issues project permission on the project containing the from (outward) issue,
- If issue-level security is configured, issue-level security permission to view the issue.
- If the comment has visibility restrictions, belongs to the group or has the role visibility is restricted to.
Servers
- https://your-domain.atlassian.net
Request headers
Name | Type | Required | Description |
---|---|---|---|
Content-Type |
String | Yes |
The media type of the request body.
Default value: "application/json" |
Request body fields
Name | Type | Required | Description |
---|---|---|---|
comment |
Object | No |
A comment. |
comment.id |
String | No |
The ID of the comment. |
comment.jsdAuthorCanSeeRequest |
Boolean | No |
Whether the comment was added from an email sent by a person who is not part of the issue. See Allow external emails to be added as comments on issuesfor information on setting up this feature. |
comment.created |
String | No |
The date and time at which the comment was created. |
comment.self |
String | No |
The URL of the comment. |
comment.properties[] |
Array | No |
A list of comment properties. Optional on create and update. |
comment.properties[].key |
String | No |
The key of the property. Required on create and update. |
comment.properties[].value |
No |
The value of the property. Required on create and update. |
|
comment.updated |
String | No |
The date and time at which the comment was updated last. |
comment.jsdPublic |
Boolean | No |
Whether the comment is visible in Jira Service Desk. Defaults to true when comments are created in the Jira Cloud Platform. This includes when the site doesn't use Jira Service Desk or the project isn't a Jira Service Desk project and, therefore, there is no Jira Service Desk for the issue to be visible on. To create a comment with its visibility in Jira Service Desk set to false, use the Jira Service Desk REST API Create request comment operation. |
comment.body |
String | No |
The comment text. |
comment.renderedBody |
String | No |
The rendered version of the comment. |
type |
Object | Yes |
This object is used as follows:
|
type.id |
String | No |
The ID of the issue link type and is used as follows:
|
type.name |
String | No |
The name of the issue link type and is used as follows:
|
type.inward |
String | No |
The description of the issue link type inward link and is used as follows:
|
type.self |
String | No |
The URL of the issue link type. Read only. |
type.outward |
String | No |
The description of the issue link type outward link and is used as follows:
|
inwardIssue |
Object | Yes |
The ID or key of a linked issue. |
inwardIssue.id |
String | No |
The ID of an issue. Required if |
inwardIssue.self |
String | No |
The URL of the issue. |
inwardIssue.key |
String | No |
The key of an issue. Required if |
outwardIssue |
Object | Yes |
The ID or key of a linked issue. |
outwardIssue.id |
String | No |
The ID of an issue. Required if |
outwardIssue.self |
String | No |
The URL of the issue. |
outwardIssue.key |
String | No |
The key of an issue. Required if |
How to start integrating
- Add HTTP Task to your workflow definition.
- Search for the API you want to integrate with and click on the name.
- This loads the API reference documentation and prepares the Http request settings.
- Click Test request to test run your request to the API and see the API's response.