Link issues
Use this request to link two issues to each other. The link is created between the current issue specified in the issue-id request parameter and the issue specified in the issue parameter.
Request format
To create a link, use an HTTP POST
request:
POST /v2/issues/<issue-id>/links?
Host: https://api.tracker.yandex.net
Authorization: OAuth <OAuth token>
X-Org-Id: <organization ID>
{
"relationship": "<type of link>",
"issue": "<issue>"
}'
- <issue-id>
- ID or key of the current issue.
- Parameters passed in the request body
-
Parameter Description Format relationship
The type of link between the two issues: relates
— Basic link.is dependent by
— The current issue blocks the linked issue.depends on
— The current issue is dependent on the linked issue.is subtask for
— The current issue is a subtask of the linked issue.is parent task for
— The current issue is the parent task of the linked issue.duplicates
— The current issue duplicates the linked issue.is duplicated by
— The linked issue duplicates the current issue.is epic of
— The current issue is an epic for the linked issue. This type of link is only available for issues with the "Epic" type.has epic
— The linked issue is an epic for the current issue. This type of link is only available for issues with the "Epic" type.
String issue
ID or key of the issue to link to. String Parameter Description Format relationship
The type of link between the two issues: relates
— Basic link.is dependent by
— The current issue blocks the linked issue.depends on
— The current issue is dependent on the linked issue.is subtask for
— The current issue is a subtask of the linked issue.is parent task for
— The current issue is the parent task of the linked issue.duplicates
— The current issue duplicates the linked issue.is duplicated by
— The linked issue duplicates the current issue.is epic of
— The current issue is an epic for the linked issue. This type of link is only available for issues with the "Epic" type.has epic
— The linked issue is an epic for the current issue. This type of link is only available for issues with the "Epic" type.
String issue
ID or key of the issue to link to. String
Linking issues:
Uses the HTTP POST method.
POST /v2/issues/TEST-1/?links HTTP/1.1
Host: https://api.tracker.yandex.net
Authorization: OAuth <OAuth token>
X-Org-Id: <organization ID>
Cache-Control: no-cache
{
"relationship": "relates",
"issue": "TREK-2"
}
Response format
{
"self" : "https://api.tracker.yandex.net/v2/issues/TEST-1/links/1048570",
"id" : 1048570,
"type" : {
"self" : "https://api.tracker.yandex.net/v2/linktypes/relates",
"id" : "relates",
"inward" : "relates",
"outward" : "relates"
},
"direction" : "inward",
"object" : {
"self" : "https://api.tracker.yandex.net/v2/issues/TREK-2",
"id" : "4ff3e8dae4b0e2ac27f6eb43",
"key" : "TREK-2",
"display" : "NEW!!!"
},
"createdBy" : {
"self" : "https://api.tracker.yandex.net/v2/users/1120000000004859",
"id": "<user ID>",
"display": "<user's display name>"
},
"updatedBy" : {
"self": "https://api.tracker.yandex.net/v2/users/1120000000049224",
"id": "<user ID>",
"display": "<user's display name>"
},
"createdAt" : "2014-06-18T12:06:02.401+0000",
"updatedAt" : "2014-06-18T12:06:02.401+0000"
}
Parameter | Description | Data type |
---|---|---|
self | Reference to the object. | String. |
id | ID of the link (relationship). | Integer. |
type | A section with information about the type of link. | Object. |
direction | The relationship of the issue specified in the request to the issue specified in the object field. Possible values: | String. |
object | A section with information about the linked issue. | Object. |
createdBy | A section with information about the user who created the link. | Object. |
updatedBy | A section with information about the user who most recently updated the linked issue. | Object. |
createdAt | Date and time when the link was created. | String. |
updatedAt | Date and time when the link was changed. | String. |
assignee | Assignee of the linked issue. | Object. |
status | Status of the linked issue. | Object. |
Fields for the type object | ||
self | Reference to the type of link. | String. |
id | ID of the type of link. | String. |
inward | The name of the relationship between the issue in the object field and the issue specified in the request. | String. |
outward | The name of the relationship between the issue in the object field and the issue specified in the request. | String. |
Fields for the object object | ||
self | URL of the API resource that contains information about the issue. | String. |
id | The issue ID. | String. |
key | The issue key. | String |
display | The display name of the issue. | String. |
Fields for the createdBy object | ||
self | Reference to the Tracker user. | String. |
id | User ID. | String. |
display | Display name of the user. | String. |
Fields for the updatedBy object | ||
self | Reference to the Tracker user. | String. |
id | User ID. | String. |
display | Display name of the user. | String. |
Fields for the assignee object | ||
self | Reference to the Tracker user. | String. |
id | User ID. | String. |
display | Display name of the user. | String. |
Fields for the status object | ||
self | A reference to the status. | String. |
id | The status ID. | String. |
key | The status key. | String. |
display | Display name of the status. | String. |
Parameter | Description | Data type |
---|---|---|
self | Reference to the object. | String. |
id | ID of the link (relationship). | Integer. |
type | A section with information about the type of link. | Object. |
direction | The relationship of the issue specified in the request to the issue specified in the object field. Possible values: | String. |
object | A section with information about the linked issue. | Object. |
createdBy | A section with information about the user who created the link. | Object. |
updatedBy | A section with information about the user who most recently updated the linked issue. | Object. |
createdAt | Date and time when the link was created. | String. |
updatedAt | Date and time when the link was changed. | String. |
assignee | Assignee of the linked issue. | Object. |
status | Status of the linked issue. | Object. |
Fields for the type object | ||
self | Reference to the type of link. | String. |
id | ID of the type of link. | String. |
inward | The name of the relationship between the issue in the object field and the issue specified in the request. | String. |
outward | The name of the relationship between the issue in the object field and the issue specified in the request. | String. |
Fields for the object object | ||
self | URL of the API resource that contains information about the issue. | String. |
id | The issue ID. | String. |
key | The issue key. | String |
display | The display name of the issue. | String. |
Fields for the createdBy object | ||
self | Reference to the Tracker user. | String. |
id | User ID. | String. |
display | Display name of the user. | String. |
Fields for the updatedBy object | ||
self | Reference to the Tracker user. | String. |
id | User ID. | String. |
display | Display name of the user. | String. |
Fields for the assignee object | ||
self | Reference to the Tracker user. | String. |
id | User ID. | String. |
display | Display name of the user. | String. |
Fields for the status object | ||
self | A reference to the status. | String. |
id | The status ID. | String. |
key | The status key. | String. |
display | Display name of the status. | String. |
Possible response codes
- 404
- The requested object was not found. You might have entered an incorrect object ID or key value.