Item Link Endpoint

Get

This method returns a list of related Items.

Get/api/items/{itemid}/links

The URL must have an Item Id. It returns a list of IssueLinkDto's.

Microsoft.NET example:

List<IssueLinkDto> items = serviceManager.Item.GetLinks(36);

JavaScript example:

var geminiUrl = "http://localhost/gemini/api/items/36/links";
var geminiUsername = Base64.encode("manager:xvitjc5bmm"); // user : apikey

$.ajax({
    url: geminiUrl,
    type: "GET",
    headers: { "Authorization": "Basic " + geminiUsername },
    success: function (data) {
      alert('Success!');
    }
});

Create

This method creates a link between two items.

Post/api/items/{itemid}/links

The URL must have an Item Id. It returns an issue link.

Microsoft.NET example:

var issueLink = new IssueLink();
issueLink.IssueId = 4;
issueLink.OtherIssueId = 10;
issueLInk.LinkTypeId = 2;
IssueLinkDto item = serviceManager.Item.CreateLink(issueLink);

JavaScript example:

var geminiUrl = "http://localhost/gemini/api/items/36/links";
var geminiUsername = Base64.encode("manager:xvitjc5bmm"); // user : apikey

$.ajax({
    url: geminiUrl,
    type: "POST",
    headers: { "Authorization": "Basic " + geminiUsername },
	data: {
		IssueId: 4, 
		OtherIssueId : 10, 
		LinkTypeId : 2 
	},
    success: function (data) {
      alert('Success!');
    }
});