Issue Link Types
The page describes resources and methods that let you read and update the Global Settings of your YouTrack service.
Resource | |
Returned entity | IssueLinkType. For the description of the entity attributes, see the Supported Fields section. |
Supported methods |
|
Supported Fields
The returned entity contains the following attributes that you can require with the fields
parameter of a request or provide in a request body.
For this particular entity, each of the fields is an object that represents a section of settings on the Global Settings page in the UI.
Field | Type | Description |
---|---|---|
aggregation | Boolean | When |
directed | Boolean | When |
localizedName | String | Localized name of the link type. |
localizedSourceToTarget | String | Localized name for outward link name. |
localizedTargetToSource | String | Localized name for inward link name. |
name | String | Name of the issue link type. |
readOnly | Boolean | When |
sourceToTarget | String | Outward link name. |
targetToSource | String | Inward link name. |
id | String | A unique entity ID. |
Read Available Link Types
Request syntax:
GET <YouTrack Service Base URL>/api/issueLinkTypes[?fields=<fields>&$top&$skip]
Request parameters
fields | string | Optional. Lets you specify a subset of attributes to return for each IssueLinkType entity in the response. If no fields specified, only the entity ID 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. |
Sample request
This sample request requires server to return the two first entities with the complete list of attributes.
curl -X GET \
'https://example.myjetbrains.com/youtrack/api/issueLinkTypes?$top=2&fields=aggregation,directed,id,localizedName,localizedSourceToTarget,localizedTargetToSource,name,readOnly,sourceToTarget,targetToSource' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer perm:am9obi5kb2U=.UG9zdG1hbiBKb2huIERvZQ==.jJe0eYhhkV271j1lCpfknNYOEakNk7' \
-H 'Cache-Control: no-cache' \
-H 'Content-Type: application/json'
Sample response body
[
{
"readOnly": false,
"localizedName": null,
"sourceToTarget": "relates to",
"directed": false,
"localizedSourceToTarget": null,
"targetToSource": "",
"localizedTargetToSource": null,
"aggregation": false,
"name": "Relates",
"id": "80-0"
},
{
"readOnly": false,
"localizedName": null,
"sourceToTarget": "is required for",
"directed": true,
"localizedSourceToTarget": null,
"targetToSource": "depends on",
"localizedTargetToSource": null,
"aggregation": false,
"name": "Depend",
"id": "80-1"
}
]
Create New Link Type
Request syntax:
POST <YouTrack Service Base URL>/api/admin/globalSettings[?fields=<fields>]
Request parameters
fields | string | Optional. Lets you specify a subset of attributes to return for each IssueLinktype entity in the response. If no fields specified, only the entity ID is returned. |
Sample request
This sample request requires server to return the two first entities with the complete list of attributes .
curl -X POST \
'https://example.myjetbrains.com/youtrack/api/issueLinkTypes?fields=aggregation,directed,id,name,readOnly,sourceToTarget,targetToSource' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer perm:am9obi5kb2U=.UG9zdG1hbiBKb2huIERvZQ==.jJe0eYhhkV271j1lCpfknNYOEakNk7' \
-H 'Cache-Control: no-cache' \
-H 'Content-Type: application/json' \
-d '{"name":"Part","targetToSource":"Part of","sourceToTarget":"Part of","aggregation":false,"directed":false,"readOnly":false}'
Sample response body
{
"readOnly": false,
"sourceToTarget": "Part of",
"directed": false,
"targetToSource": "Part of",
"aggregation": false,
"name": "Part",
"id": "80-8"
}
Operations with a Link Type
Resource | |
Returned entity | IssueLinkType. For the description of the entity attributes, see the Supported Fields section. |
Supported methods |
Read a Link Type
Request syntax:
GET <YouTrack Service Base URL>/api/issueLinkTypes/<issueLinkTypeID>[?fields=<fields>]
Request parameters
<issueLinkTypeID> | string | An entity ID of the link type to get. |
fields | string | Optional. Lets you specify a subset of attributes to return for each IssueLinkType entity in the response. If no fields specified, only the entity ID is returned. |
Sample request
This sample request requires server to return the two first entities with the complete list of attributes .
curl -X GET \
'https://example.myjetbrains.com/youtrack/api/issueLinkTypes/80-1?fields=aggregation,directed,id,name,readOnly,sourceToTarget,targetToSource' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer perm:am9obi5kb2U=.UG9zdG1hbiBKb2huIERvZQ==.jJe0eYhhkV271j1lCpfknNYOEakNk7' \
-H 'Cache-Control: no-cache' \
-H 'Content-Type: application/json'
Sample response body
{
"readOnly": false,
"sourceToTarget": "is required for",
"directed": true,
"targetToSource": "depends on",
"aggregation": false,
"name": "Depend",
"id": "80-1"
}
Update a Link Type
Request syntax:
POST <YouTrack Service Base URL>/api/issueLinkTypes/<issueLinkTypeID>[?fields=<fields>]
Request parameters
<issueLinkTypeID> | string | An entity ID of the link type to update. |
fields | string | Optional. Lets you specify a subset of attributes to return for each IssueLinktype entity in the response. If no fields specified, only the entity ID is returned. |
Sample request
This sample request requires server to return the two first entities with the complete list of attributes.
curl -X POST \
'https://example.myjetbrains.com/youtrack/api/issueLinkTypes/80-8?fields=aggregation,directed,id,name,readOnly,sourceToTarget,targetToSource' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer perm:am9obi5kb2U=.UG9zdG1hbiBKb2huIERvZQ==.jJe0eYhhkV271j1lCpfknNYOEakNk7' \
-H 'Cache-Control: no-cache' \
-H 'Content-Type: application/json' \
-d '{"name":"Group","targetToSource":"Part of","sourceToTarget":"Part of","aggregation":true}'
Sample response body
{
"readOnly": false,
"sourceToTarget": "Part of",
"directed": false,
"targetToSource": "Part of",
"aggregation": true,
"name": "Group",
"id": "80-8"
}
Delete a Link Type
Request syntax:
DELETE <YouTrack Service Base URL>/api/issueLinkTypes/<issueLinkTypeID>
Request parameters
<issueLinkTypeID> | string | An entity ID of the link type to delete. |
Sample request
DELETE -X GET \
'https://example.myjetbrains.com/youtrack/api/issueLinkTypes/80-8' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer perm:am9obi5kb2U=.UG9zdG1hbiBKb2huIERvZQ==.jJe0eYhhkV271j1lCpfknNYOEakNk7' \
-H 'Cache-Control: no-cache' \
-H 'Content-Type: application/json'