Add hyperlink to description with Azure DevOps Services REST API

Viewed 1523

My actual code which paste this as plain text, not as hyperlink: POST to: https://dev.azure.com/{user}/{project}/_apis/wit/workitems/${type}?api-version=5.0-preview.3

[
  {
    "op": "add",
    "path": "/fields/System.Title",
    "from": null,
    "value": "Sample task"
  },
  {
    "op": "add",
    "path": "/fields/System.Description",
    "from": null,
    "value": "Link: https://stackoverflow.com/ "
  }
]

I want to achieve this effect, especially to have hyperlink in the description:

Description:

Link: https://stackoverflow.com/

I can't put photo to the post so i put link to it: https://i.imgur.com/E4Q2xmB.png

Is it possible to add this?

1 Answers

Adjust your body to this:

[
  {
    "op": "add",
    "path": "/fields/System.Title",
    "from": null,
    "value": "Sample task"
  },
  {
    "op": "add",
    "path": "/fields/System.Description",
    "from": null,
    "value": "<div>Link: <a href=\"https://stackoverflow.com/\">https://stackoverflow.com/</a></div>"
  }
]
Related