This resource represents links between issues. Use it to get, create, and delete links between issues.
To use it, the site must have issue linking enabled.
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/3/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:
write:jira-work
write:comment:jira
, write:issue:jira
, write:issue-link:jira
Connect app scope required: WRITE
The issue link request.
Comment
LinkedIssue
RequiredLinkedIssue
RequiredIssueLinkType
RequiredReturned if the request is successful.
any
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
// This sample uses Atlassian Forge
// https://developer.atlassian.com/platform/forge/
import api, { route } from "@forge/api";
var bodyData = `{
"comment": {
"body": {
"content": [
{
"content": [
{
"text": "Linked related issue!",
"type": "text"
}
],
"type": "paragraph"
}
],
"type": "doc",
"version": 1
},
"visibility": {
"identifier": "276f955c-63d7-42c8-9520-92d01dca0625",
"type": "group",
"value": "jira-software-users"
}
},
"inwardIssue": {
"key": "HSP-1"
},
"outwardIssue": {
"key": "MKY-1"
},
"type": {
"name": "Duplicate"
}
}`;
const response = await api.asUser().requestJira(route`/rest/api/3/issueLink`, {
method: 'POST',
headers: {
'Accept': 'application/json',
'Content-Type': 'application/json'
},
body: bodyData
});
console.log(`Response: ${response.status} ${response.statusText}`);
console.log(await response.json());
Returns an issue link.
This operation can be accessed anonymously.
Permissions required:
read:jira-work
read:field:jira
, read:issue-link-type:jira
, read:issue:jira
, read:issue-type:jira
, read:priority:jira
...(Show more)Connect app scope required: READ
string
RequiredReturned if the request is successful.
Details of a link between issues.
1
2
3
4
5
6
7
8
9
10
11
12
// This sample uses Atlassian Forge
// https://developer.atlassian.com/platform/forge/
import api, { route } from "@forge/api";
const response = await api.asUser().requestJira(route`/rest/api/3/issueLink/{linkId}`, {
headers: {
'Accept': 'application/json'
}
});
console.log(`Response: ${response.status} ${response.statusText}`);
console.log(await response.json());
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
{
"id": "10001",
"inwardIssue": {
"fields": {
"issuetype": {
"avatarId": 10002,
"description": "A problem with the software.",
"entityId": "9d7dd6f7-e8b6-4247-954b-7b2c9b2a5ba2",
"hierarchyLevel": 0,
"iconUrl": "https://your-domain.atlassian.net/secure/viewavatar?size=xsmall&avatarId=10316&avatarType=issuetype\",",
"id": "1",
"name": "Bug",
"scope": {
"project": {
"id": "10000"
},
"type": "PROJECT"
},
"self": "https://your-domain.atlassian.net/rest/api/3/issueType/1",
"subtask": false
},
"priority": {
"description": "Very little impact.",
"iconUrl": "https://your-domain.atlassian.net/images/icons/priorities/trivial.png",
"id": "2",
"name": "Trivial",
"self": "https://your-domain.atlassian.net/rest/api/3/priority/5",
"statusColor": "#cfcfcf"
},
"status": {
"description": "The issue is closed.",
"iconUrl": "https://your-domain.atlassian.net/images/icons/closed.gif",
"id": "5",
"name": "Closed",
"self": "https://your-domain.atlassian.net/rest/api/3/status/5",
"statusCategory": {
"colorName": "green",
"id": 9,
"key": "completed",
"self": "https://your-domain.atlassian.net/rest/api/3/statuscategory/9"
}
}
},
"id": "10004",
"key": "PR-3",
"self": "https://your-domain.atlassian.net/rest/api/3/issue/PR-3"
},
"outwardIssue": {
"fields": {
"issuetype": {
"avatarId": 1,
"description": "A task that needs to be done.",
"hierarchyLevel": 0,
"iconUrl": "https://your-domain.atlassian.net/secure/viewavatar?size=xsmall&avatarId=10299&avatarType=issuetype\",",
"id": "3",
"name": "Task",
"self": "https://your-domain.atlassian.net/rest/api/3/issueType/3",
"subtask": false
},
"priority": {
"description": "Major loss of function.",
"iconUrl": "https://your-domain.atlassian.net/images/icons/priorities/major.png",
"id": "1",
"name": "Major",
"self": "https://your-domain.atlassian.net/rest/api/3/priority/3",
"statusColor": "#009900"
},
"status": {
"description": "The issue is currently being worked on.",
"iconUrl": "https://your-domain.atlassian.net/images/icons/progress.gif",
"id": "10000",
"name": "In Progress",
"self": "https://your-domain.atlassian.net/rest/api/3/status/10000",
"statusCategory": {
"colorName": "yellow",
"id": 1,
"key": "in-flight",
"name": "In Progress",
"self": "https://your-domain.atlassian.net/rest/api/3/statuscategory/1"
}
}
},
"id": "10004L",
"key": "PR-2",
"self": "https://your-domain.atlassian.net/rest/api/3/issue/PR-2"
},
"type": {
"id": "1000",
"inward": "Duplicated by",
"name": "Duplicate",
"outward": "Duplicates",
"self": "https://your-domain.atlassian.net/rest/api/3/issueLinkType/1000"
}
}
Deletes an issue link.
This operation can be accessed anonymously.
Permissions required:
write:jira-work
delete:issue-link:jira
Connect app scope required: DELETE
string
Required200 response
1
2
3
4
5
6
7
8
9
10
// This sample uses Atlassian Forge
// https://developer.atlassian.com/platform/forge/
import api, { route } from "@forge/api";
const response = await api.asUser().requestJira(route`/rest/api/3/issueLink/{linkId}`, {
method: 'DELETE'
});
console.log(`Response: ${response.status} ${response.statusText}`);
console.log(await response.text());
Rate this page: