'Azure DevOps Web Hooks. What's the difference between resource:id and resource:workItemId

When using Azure DevOps' Web Hooks, this is (part of) the event that gets posted when a Work Item is updated.

{
  "eventType": "workitem.updated",
  "message": {
    "text": "User Story #1955",
    ...
  },
  "resource": {
    "id": 9,
    "workItemId": 1955,
    ...
  },
  ...
}

Meanwhile, this is (part of) the event that gets posted when a Work Item is created

{
  "eventType": "workitem.created",
  "message": {
    "text": "User Story #2053",
    ...
  },
  "resource": {
    "id": 2053,
    ... (workItemId absent)
  },
  ...
}

In the former, the workItemId denotes the 'number' of the User Story. In the latter, this is denoted by simply id.

Does this have a good reason? And what does resource:id (= 9) denote in the updated event?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source