0
votes

I've been unable to find out how to update work item links using the Azure DevOps REST API. Does anyone know the REST command to use to do this? I'm thinking it may be possible to use the work item update patch call but not sure how to structure the body?

For example we can use the following call to update the OTLNumber field

PATCH: https://dev.azure.com/myorg/_apis/wit/workitems/1824160?api-version=6.0&bypassRules=True

Body:

[
  {
    "op": "test",
    "path": "/rev",
    "value": 3

  },
  {
    "op": "add",
    "path": "/fields/Custom.OTLNumber",
    "value": "35195"
  }
]

Something like this to set the 'tested by' link to the test case number 1824175?

[
  {
    "op": "test",
    "path": "/rev",
    "value": 1

  },
  {
    "op": "add",
    
    "path": "/relations/added.Microsoft.VSTS.Common.TestedBy-Forward",
    "value": "https://dev.azure.com/zionseto/_apis/wit/workItems/1824175"
  }
]

Any help would be appreciated. Having a hard time finding in their documentation.