Work item relation types

Last Update: 12/5/2016

api-version = 1.0

Relation types define the types of associations work items can have with work items and other resources, but especially links between two work items.

If you haven't already, look at the information on getting started with these APIs.

Get a list of relation types

GET https://{instance}/DefaultCollection/_apis/wit/workItemRelationTypes?api-version={version}
Property Type Description
URL
instance string VS Team Services account ({account}.visualstudio.com) or TFS server ({server:port}).
Query
api-version string Version of the API to use.

Sample request

GET https://fabrikam-fiber-inc.visualstudio.com/DefaultCollection/_apis/wit/workitemrelationtypes?api-version=1.0

Sample response

Status code: 200
{
  "count": 14,
  "value": [
    {
      "attributes": {
        "usage": "workItemLink",
        "editable": true,
        "enabled": true,
        "acyclic": true,
        "directional": true,
        "singleTarget": true,
        "topology": "dependency"
      },
      "referenceName": "Microsoft.VSTS.TestCase.SharedParameterReferencedBy-Forward",
      "name": "Referenced By",
      "url": "https://fabrikam-fiber-inc.visualstudio.com/DefaultCollection/_apis/wit/workItemRelationTypes/Microsoft.VSTS.TestCase.SharedParameterReferencedBy-Forward"
    },
    {
      "attributes": {
        "usage": "workItemLink",
        "editable": true,
        "enabled": true,
        "acyclic": true,
        "directional": true,
        "singleTarget": true,
        "topology": "dependency"
      },
      "referenceName": "Microsoft.VSTS.TestCase.SharedParameterReferencedBy-Reverse",
      "name": "References",
      "url": "https://fabrikam-fiber-inc.visualstudio.com/DefaultCollection/_apis/wit/workItemRelationTypes/Microsoft.VSTS.TestCase.SharedParameterReferencedBy-Reverse"
    },
    {
      "attributes": {
        "usage": "workItemLink",
        "editable": true,
        "enabled": true,
        "acyclic": true,
        "directional": true,
        "singleTarget": true,
        "topology": "dependency"
      },
      "referenceName": "Microsoft.VSTS.Common.TestedBy-Forward",
      "name": "Tested By",
      "url": "https://fabrikam-fiber-inc.visualstudio.com/DefaultCollection/_apis/wit/workItemRelationTypes/Microsoft.VSTS.Common.TestedBy-Forward"
    },
    {
      "attributes": {
        "usage": "workItemLink",
        "editable": true,
        "enabled": true,
        "acyclic": true,
        "directional": true,
        "singleTarget": true,
        "topology": "dependency"
      },
      "referenceName": "Microsoft.VSTS.Common.TestedBy-Reverse",
      "name": "Tests",
      "url": "https://fabrikam-fiber-inc.visualstudio.com/DefaultCollection/_apis/wit/workItemRelationTypes/Microsoft.VSTS.Common.TestedBy-Reverse"
    },
    {
      "attributes": {
        "usage": "workItemLink",
        "editable": true,
        "enabled": true,
        "acyclic": true,
        "directional": true,
        "singleTarget": true,
        "topology": "dependency"
      },
      "referenceName": "Microsoft.VSTS.TestCase.SharedStepReferencedBy-Forward",
      "name": "Test Case",
      "url": "https://fabrikam-fiber-inc.visualstudio.com/DefaultCollection/_apis/wit/workItemRelationTypes/Microsoft.VSTS.TestCase.SharedStepReferencedBy-Forward"
    },
    {
      "attributes": {
        "usage": "workItemLink",
        "editable": true,
        "enabled": true,
        "acyclic": true,
        "directional": true,
        "singleTarget": true,
        "topology": "dependency"
      },
      "referenceName": "Microsoft.VSTS.TestCase.SharedStepReferencedBy-Reverse",
      "name": "Shared Steps",
      "url": "https://fabrikam-fiber-inc.visualstudio.com/DefaultCollection/_apis/wit/workItemRelationTypes/Microsoft.VSTS.TestCase.SharedStepReferencedBy-Reverse"
    },
    {
      "attributes": {
        "usage": "workItemLink",
        "editable": false,
        "enabled": true,
        "acyclic": true,
        "directional": true,
        "singleTarget": true,
        "topology": "dependency"
      },
      "referenceName": "System.LinkTypes.Dependency-Forward",
      "name": "Successor",
      "url": "https://fabrikam-fiber-inc.visualstudio.com/DefaultCollection/_apis/wit/workItemRelationTypes/System.LinkTypes.Dependency-Forward"
    },
    {
      "attributes": {
        "usage": "workItemLink",
        "editable": false,
        "enabled": true,
        "acyclic": true,
        "directional": true,
        "singleTarget": true,
        "topology": "dependency"
      },
      "referenceName": "System.LinkTypes.Dependency-Reverse",
      "name": "Predecessor",
      "url": "https://fabrikam-fiber-inc.visualstudio.com/DefaultCollection/_apis/wit/workItemRelationTypes/System.LinkTypes.Dependency-Reverse"
    },
    {
      "attributes": {
        "usage": "workItemLink",
        "editable": false,
        "enabled": true,
        "acyclic": true,
        "directional": true,
        "singleTarget": false,
        "topology": "tree"
      },
      "referenceName": "System.LinkTypes.Hierarchy-Forward",
      "name": "Child",
      "url": "https://fabrikam-fiber-inc.visualstudio.com/DefaultCollection/_apis/wit/workItemRelationTypes/System.LinkTypes.Hierarchy-Forward"
    },
    {
      "attributes": {
        "usage": "workItemLink",
        "editable": false,
        "enabled": true,
        "acyclic": true,
        "directional": true,
        "singleTarget": false,
        "topology": "tree"
      },
      "referenceName": "System.LinkTypes.Hierarchy-Reverse",
      "name": "Parent",
      "url": "https://fabrikam-fiber-inc.visualstudio.com/DefaultCollection/_apis/wit/workItemRelationTypes/System.LinkTypes.Hierarchy-Reverse"
    },
    {
      "attributes": {
        "usage": "workItemLink",
        "editable": false,
        "enabled": true,
        "acyclic": false,
        "directional": false,
        "singleTarget": true,
        "topology": "network"
      },
      "referenceName": "System.LinkTypes.Related",
      "name": "Related",
      "url": "https://fabrikam-fiber-inc.visualstudio.com/DefaultCollection/_apis/wit/workItemRelationTypes/System.LinkTypes.Related"
    },
    {
      "attributes": {
        "usage": "resourceLink",
        "editable": false,
        "enabled": true
      },
      "referenceName": "AttachedFile",
      "name": "Attached File",
      "url": "https://fabrikam-fiber-inc.visualstudio.com/DefaultCollection/_apis/wit/workItemRelationTypes/AttachedFile"
    },
    {
      "attributes": {
        "usage": "resourceLink",
        "editable": false,
        "enabled": true
      },
      "referenceName": "Hyperlink",
      "name": "Hyperlink",
      "url": "https://fabrikam-fiber-inc.visualstudio.com/DefaultCollection/_apis/wit/workItemRelationTypes/Hyperlink"
    },
    {
      "attributes": {
        "usage": "resourceLink",
        "editable": false,
        "enabled": true
      },
      "referenceName": "ArtifactLink",
      "name": "Artifact Link",
      "url": "https://fabrikam-fiber-inc.visualstudio.com/DefaultCollection/_apis/wit/workItemRelationTypes/ArtifactLink"
    }
  ]
}

Get a relation type

GET https://{instance}/DefaultCollection/_apis/wit/workItemRelationTypes/{name}?api-version={version}
Property Type Description
URL
instance string VS Team Services account ({account}.visualstudio.com) or TFS server ({server:port}).
name string The name of the relationship.
Query
api-version string Version of the API to use.

Sample request

GET https://fabrikam-fiber-inc.visualstudio.com/DefaultCollection/_apis/wit/workitemrelationtypes/System.LinkTypes.Related?api-version=1.0

Sample response

Status code: 200
{
  "attributes": {
    "usage": "workItemLink",
    "editable": false,
    "enabled": true,
    "acyclic": false,
    "directional": false,
    "singleTarget": true,
    "topology": "network"
  },
  "referenceName": "System.LinkTypes.Related",
  "name": "Related",
  "url": "https://fabrikam-fiber-inc.visualstudio.com/DefaultCollection/_apis/wit/workItemRelationTypes/System.LinkTypes.Related"
}