Developer Portal for YouTrack and Hub Help

Issue Links

This resource lets you read links of the issue.

Resource

/api/issues/{issueID}/links

Returned entity

IssueLink. For the description of the entity attributes, see Supported Fields section.

Supported methods

Supported sub-resources

Represents issue links of a particular link type (for example, 'relates to').

Related Resources

Below you can find the list of resources that let you work with this entity.

Attributes

This table describes attributes of the IssueLink entity.

  • To receive an attribute in the response from the server, specify it explicitly in the fields request parameter.

  • To update an attribute, provide it in the body of a POST request.

Field

Type

Description

id

String

The ID of the issue link. Read-only.

direction

Enumeration

Link direction. Supported values are OUTWARD, INWARD, and BOTH. Read-only.

linkType

IssueLinkType

Link type. Read-only. Can be null.

issues

Array of Issues

List of issues that are linked with this type.

trimmedIssues

Array of Issues

The trimmed list of issues. This property can be used to avoid performance problems for issues that have many links. Use $topLinks and $skipLinks parameters to request a particular part of the whole list. Read-only.

Get the list of links for the issue. In response to this request, you receive a collection of JSON objects for each possible issue link type. If the current issue is linked to another one or more issues with a specific link, then the issues attribute in the respective object will contain a collection of these issues.

Request syntax

GET /api/issues/{issueID}/links?{fields}&{$top}&{$skip}

Request parameters

Parameter

Type

Description

fields

String

A list of IssueLink attributes that should be returned in the response. If no field is specified, only the entityID is returned.

$skip

Int

Optional. Lets you set a number of returned entities to skip before returning the first one.

$top

Int

Optional. Lets you specify the maximum number of entries that are returned in the response. If you don't set the $top value, the server limits the maximum number of returned entries.

The server returns a maximum of 42 entries for most resources that return collections. For more information, see Pagination.

Sample request

https://example.youtrack.cloud/api/issues/2-33/links?fields=id,idReadable,direction,linkType(name,localizedName,sourceToTarget,targetToSource,directed,aggregation),issues(id,idReadable,summary)

Sample response body

[ { "direction": "BOTH", "linkType": { "sourceToTarget": "relates to", "directed": false, "aggregation": false, "targetToSource": "", "localizedName": null, "name": "Relates", "$type": "IssueLinkType" }, "issues": [], "id": "80-0", "$type": "IssueLink" }, { "direction": "OUTWARD", "linkType": { "sourceToTarget": "is required for", "directed": true, "aggregation": false, "targetToSource": "depends on", "localizedName": null, "name": "Depend", "$type": "IssueLinkType" }, "issues": [ { "summary": "Huston!", "idReadable": "SP-39", "id": "2-44", "$type": "Issue" } ], "id": "80-1s", "$type": "IssueLink" }, { "direction": "INWARD", "linkType": { "sourceToTarget": "is required for", "directed": true, "aggregation": false, "targetToSource": "depends on", "localizedName": null, "name": "Depend", "$type": "IssueLinkType" }, "issues": [], "id": "80-1t", "$type": "IssueLink" }, { "direction": "OUTWARD", "linkType": { "sourceToTarget": "is duplicated by", "directed": true, "aggregation": true, "targetToSource": "duplicates", "localizedName": null, "name": "Duplicate", "$type": "IssueLinkType" }, "issues": [], "id": "80-2s", "$type": "IssueLink" }, { "direction": "INWARD", "linkType": { "sourceToTarget": "is duplicated by", "directed": true, "aggregation": true, "targetToSource": "duplicates", "localizedName": null, "name": "Duplicate", "$type": "IssueLinkType" }, "issues": [], "id": "80-2t", "$type": "IssueLink" }, { "direction": "OUTWARD", "linkType": { "sourceToTarget": "parent for", "directed": true, "aggregation": true, "targetToSource": "subtask of", "localizedName": null, "name": "Subtask", "$type": "IssueLinkType" }, "issues": [], "id": "80-3s", "$type": "IssueLink" }, { "direction": "INWARD", "linkType": { "sourceToTarget": "parent for", "directed": true, "aggregation": true, "targetToSource": "subtask of", "localizedName": null, "name": "Subtask", "$type": "IssueLinkType" }, "issues": [], "id": "80-3t", "$type": "IssueLink" }, { "direction": "OUTWARD", "linkType": { "sourceToTarget": "required for", "directed": true, "aggregation": false, "targetToSource": "dependent on", "localizedName": null, "name": "Depend 2", "$type": "IssueLinkType" }, "issues": [], "id": "80-4s", "$type": "IssueLink" }, { "direction": "INWARD", "linkType": { "sourceToTarget": "required for", "directed": true, "aggregation": false, "targetToSource": "dependent on", "localizedName": null, "name": "Depend 2", "$type": "IssueLinkType" }, "issues": [], "id": "80-4t", "$type": "IssueLink" }, { "direction": "BOTH", "linkType": { "sourceToTarget": "Part of", "directed": false, "aggregation": true, "targetToSource": "Part of", "localizedName": null, "name": "Group", "$type": "IssueLinkType" }, "issues": [], "id": "80-9", "$type": "IssueLink" } ]
Last modified: 7 November 2024