[Resolved] Using the REST API to link issues with DB IDs

In this example we can link issues using human readable IDs. How to do the same with database ID?

{
  "query": "relates to NP-92",
  "issues": [
    {
      "idReadable": "NP-113"
    }
  ]
}

How to correctly replace NP-92 with 1-111, for example? This does not work:

{
"query": "relates to 1-111",
  "issues": [
    {
    "id": "2-13"
    }
  ]
}
0
4 comments

If you use a link command, then you need to use the human-readable ID. Basically, it is the same command that you can use in YouTrack in the command dialogue, and it uses the human-readable ID.

You can use this method instead and add new links with it.

0

I need to create a link "relates to" between 1-111 and 2-13, how can i do that?

0
https://youtrack.domain.com/api/issues/1-111/links/105-3s/issues?fields=id,idReadable,summary

{ "id" : "2-13" }

1-111 - parent Issue
105-3s - directed link (s)
2-13 - subtask issue

Link types

0

Please sign in to leave a comment.