Adding an external link
Use this request to create a link for working with an external application object.
POST
https://api.tracker.yandex.net/v3/issues/<issue_ID>/remotelinks?backlink=true
Query format
Before making a request, get permission to access the API.
To create an external link, use an HTTP POST
request.
POST /v3/issues/<issue_ID>/remotelinks?backlink=true
Host: api.tracker.yandex.net
Authorization: OAuth <OAuth_token>
X-Org-ID or X-Cloud-Org-ID: <organization_ID>
{
"relationship": "RELATES",
"key": "<object_key>",
"origin": "<application_ID>"
}
Headers
-
Host
: Address of the node that provides the API. -
Authorization
: Authorization token about these formats:-
OAuth <OAuth_token>
: For authorization using the OAuth 2.0 protocol. Learn more -
Bearer <IAM_token>
: For authorization using an IAM token, if a Yandex Cloud Organization organization is linked to Tracker. Learn more
-
-
X-Org-ID
orX-Cloud-Org-ID
: Organization ID.-
Use the
X-Org-ID
header if a Tracker organization is linked to Yandex 360 for Business. -
Use the
X-Cloud-Org-ID
header if a Tracker organization is linked to Yandex Cloud Organization.
To get the organization ID, go to Administration → Organizations and copy the value from the ID field.
-
Resource
Parameter | Description | Data type |
---|---|---|
<issue_key_or_ID> | ID or key of the current issue. | String |
Request parameters
Additional parameters
Parameter | Description | Data type |
---|---|---|
backlink | Set true to execute a request from Tracker, when adding a link, to create a duplicate link in an external application. |
Boolean |
Request body parameters
Required parameters
Parameter | Description | Data type |
---|---|---|
relationship | Link type. We recommend using the value RELATES . |
String |
key | Key of the external application object. | String |
origin | ID of the application whose object you need to create a link to. | String |
Response format
If the request is successful, the API returns a response with code 201 Created
.
The request body contains information about the created link in JSON format.
{
"self": "https://api.tracker.yandex.net/v3/issues/<issue_ID>/remotelinks/51******",
"id": 51******,
"type": {
"self": "https://api.tracker.yandex.net/v3/linktypes/relates",
"id": "relates",
"inward": "Linked",
"outward": "Linked"
},
"direction": "outward",
"object": {
"self": "https://api.tracker.yandex.net/v3/applications/ru.yandex.bitbucket/objects/13570010********",
"id": "13570010********",
"key": "TEST-17",
"application": {
"self": "https://api.tracker.yandex.net/v3/applications/25811000********",
"id": "25811000********",
"type": "app",
"name": "test-app"
}
},
"createdBy": {
"self": "https://api.tracker.yandex.net/v3/users/11********",
"id": "11********",
"display": "display-user-name"
},
"updatedBy": {
"self": "https://api.tracker.yandex.net/v3/users/11********",
"id": "11********",
"display": "display-user-name"
},
"createdAt": "2021-07-19T06:18:09.327+0000",
"updatedAt": "2021-07-19T06:18:09.327+0000"
}
Response parameters
Parameter | Description | Data type |
---|---|---|
self | Address of the API resource with information about the external link. | String |
id | Link ID. | String |
type | Block with information about the link type. | Map item |
direction | Link direction. This parameter is relevant for non-symmetric link types, e.g., Parent issue — Sub-issue. Possible values:
|
String |
object | Block with information about an external application object. | Map item |
createdBy | Block with information about the user who created the link. | Map item |
updatedBy | Block with information about the employee who updated the link last. | Map item |
createdAt | Link creation date and time | String |
updatedAt | Date and time when the link was last updated. | String |
type
object fields
Parameter | Description | Data type |
---|---|---|
self | Address of the API resource with information about the link type. | String |
id | ID of the link type. | String |
inward | Link type name depending on the direction. | String |
outward | Link type name depending on the direction. | String |
object
object fields
Parameter | Description | Data type |
---|---|---|
self | Address of the API resource with information about the external application object. | String |
id | Object ID. | String |
key | Object key. | String |
application | Block with information about the external application. | Map item |
application
object fields
Parameter | Description | Data type |
---|---|---|
self | Address of the API resource with information about the external application. | String |
id | Application ID. | String |
type | Application type. | String |
name | Application name displayed. | String |
createdBy
object fields
Parameter | Description | Data type |
---|---|---|
self | Address of the API resource with information about the user | String |
id | User ID. | String |
display | Displayed user name | String |
passportUid | Unique ID of the user account in the Yandex 360 for Business organization and Yandex ID. | Number |
cloudUid | Unique user ID in Yandex Cloud Organization | String |
updatedBy
object fields
Parameter | Description | Data type |
---|---|---|
self | Address of the API resource with information about the user | String |
id | User ID. | String |
display | Displayed user name | String |
passportUid | Unique ID of the user account in the Yandex 360 for Business organization and Yandex ID. | Number |
cloudUid | Unique user ID in Yandex Cloud Organization | String |
If the request is processed incorrectly, the API returns a response with an error code:
- 400
- One or more request parameters have an invalid value.
- 401
- The user is not authorized. Make sure that actions described in the API access section are performed.
- 403
- You are not authorized to perform this action. You can check what rights you have in the Tracker interface. The same rights are required to perform an action via the API and interface.
- 404
- The requested object was not found. You may have specified an invalid object ID or key.