# Issue Link Types

This resource provides operations with issue link types.
|  Resource  |     ```GENERIC /api/issueLinkTypes ```    |
| --- | --- |
|  Returned entity  |  [IssueLinkType](api-entity-IssueLinkType.html). For the description of the entity attributes, see [Supported Fields](#IssueLinkType-supported-fields) section.  |
|  Supported methods  |      * `GET`: [Read a List of IssueLinkTypes](#get_all-IssueLinkType-method).    * `POST`: [Add a New IssueLinkType](#create-IssueLinkType-method).    |

## IssueLinkType attributes

Represents the settings of a link type in YouTrack.

### Related Resources

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

* [Issue Link Types]()

### Attributes

This table describes attributes of the `IssueLinkType` 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 type. `Read-only`.  |
|  name  |  String  |  The name of the issue link type.  |
|  localizedName  |  String  |  The localized name of the issue link type. It is present and can be updated only for predefined issue link types in localized YouTrack installations. `Can be null`.  |
|  sourceToTarget  |  String  |  The outward name of the issue link type.  |
|  localizedSourceToTarget  |  String  |  The localized outward name of the issue link type. It is present and can be updated only for predefined issue link types in localized YouTrack installations. `Can be null`.  |
|  targetToSource  |  String  |  The inward name of the issue link type. `Can be null`.  |
|  localizedTargetToSource  |  String  |  The localized inward name of the issue link type. It is present and can be updated only for the predefined issue link types in localized YouTrack installations. `Can be null`.  |
|  directed  |  Boolean  |  If `true`, the link is directed. Otherwise, `false`.  |
|  aggregation  |  Boolean  |  If `true`, the link represents aggregation relation. Otherwise, `false`.  |
|  readOnly  |  Boolean  |  If `true`, link settings cannot be updated. Otherwise, `false`. `Read-only`.  |

## Read a List of IssueLinkTypes

Get the list of all available link types in the system.

### Request syntax

```GENERIC
GET /api/issueLinkTypes?{fields}&{$top}&{$skip}
```

|  null  |  The database ID of IssueLinkType  |
| --- | --- |

### Request parameters

|  Parameter  |  Type  |  Description  |
| --- | --- | --- |
|  fields  |  String  |  A list of IssueLinkType 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/issueLinkTypes?fields=aggregation,directed,id,name,readOnly,sourceToTarget,targetToSource
```

#### Sample response body

```JSON
[
  {
    "readOnly": false,
    "targetToSource": "",
    "directed": false,
    "aggregation": false,
    "sourceToTarget": "relates to",
    "name": "Relates",
    "id": "80-0",
    "$type": "IssueLinkType"
  },
  {
    "readOnly": false,
    "targetToSource": "depends on",
    "directed": true,
    "aggregation": false,
    "sourceToTarget": "is required for",
    "name": "Depend",
    "id": "80-1",
    "$type": "IssueLinkType"
  },
  {
    "readOnly": true,
    "targetToSource": "duplicates",
    "directed": true,
    "aggregation": true,
    "sourceToTarget": "is duplicated by",
    "name": "Duplicate",
    "id": "80-2",
    "$type": "IssueLinkType"
  },
  {
    "readOnly": true,
    "targetToSource": "subtask of",
    "directed": true,
    "aggregation": true,
    "sourceToTarget": "parent for",
    "name": "Subtask",
    "id": "80-3",
    "$type": "IssueLinkType"
  },
  {
    "readOnly": false,
    "targetToSource": "dependent on",
    "directed": true,
    "aggregation": false,
    "sourceToTarget": "required for",
    "name": "Depend 2",
    "id": "80-4",
    "$type": "IssueLinkType"
  }
]
```

## Add a New IssueLinkType

Create a new issue link type.

Required fields: `name`, `targetToSource`, `sourceToTarget`.

### Required permissions

Requires permissions: Low-level Admin Write

### Request syntax

```GENERIC
POST /api/issueLinkTypes?{fields}
```

|  null  |  The database ID of IssueLinkType  |
| --- | --- |

### Request parameters

|  Parameter  |  Type  |  Description  |
| --- | --- | --- |
|  fields  |  String  |  A list of IssueLinkType attributes that should be returned in the response. If no field is specified, only the `entityID` is returned.  |

### Sample

#### Sample request

```CURL
https://example.youtrack.cloud/api/issueLinkTypes?fields=aggregation,directed,id,name,readOnly,sourceToTarget,targetToSource
```

#### Sample request body

```JSON
{
  "name": "Part",
  "targetToSource": "Part of",
  "sourceToTarget": "Part of",
  "aggregation": true,
  "directed": false,
  "readOnly": false
}
```

#### Sample response body

```JSON
{
  "readOnly": false,
  "directed": false,
  "sourceToTarget": "Part of",
  "targetToSource": "Part of",
  "aggregation": true,
  "name": "Part",
  "id": "41-14",
  "$type": "IssueLinkType"
}
```

