# Issue Links

This resource lets you read links of the issue.
|  Resource  |     ```GENERIC /api/issues/{issueID}/links ```    |
| --- | --- |
|  Returned entity  |  [IssueLink](api-entity-IssueLink.html). For the description of the entity attributes, see [Supported Fields](#IssueLink-supported-fields) section.  |
|  Supported methods  |      * `GET`: [Read a List of IssueLinks](#get_all-IssueLink-method).    |
|  Supported sub-resources  |      * [/api/issues/{issueID}/links/{linkID}](operations-api-issues-issueID-links.html)    * [/api/issues/{issueID}/links/{linkID}/issues](resource-api-issues-issueID-links-linkID-issues.html)    |

## IssueLink attributes

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.

* [Issue Links]()

### 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](api-entity-IssueLinkType.html)  |  Link type. `Read-only`. `Can be null`.  |
|  issues  |  [Array of Issues](api-entity-Issue.html)  |  List of issues that are linked with this type.  |
|  trimmedIssues  |  [Array of Issues](api-entity-Issue.html)  |  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`.  |

## Read a List of IssueLinks

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

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

|  null  |  The database ID of IssueLink  |
| --- | --- |

### 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](api-concept-pagination.html).     |

### Sample

#### Sample request

```CURL
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

```JSON
[
  {
    "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"
  }
]
```

