Share via


Work item discussion history (deprecated)

TFS 2017 | TFS 2015 | TFS 2013

Note

Looking for REST APIS that support TFS 2018 or later versions? See the Azure DevOps REST API Reference.

This resource has been deprecated as of api-version = 3.0-preview. Please use the comments API instead.

api-version = 1.0

Discussion history is a list of comments provided by user on a work item. These are stored as part of revisions but this endpoint is a short-hand way to view the complete discussion of a work item.

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

Get a list of all discussion history

GET https://{instance}/DefaultCollection/_apis/wit/workitems/{id}/history?api-version={version}[&$top={int}&$skip={int}]
Parameter Type Default Notes
URL
instance string VS Team Services account ({account}.visualstudio.com) or TFS server ({server:port}).
id int ID of the work item.
Query
api-version string Version of the API to use.
$top integer 200 Number of discussion history entries to return, up to 200.
$skip integer 0 Number of discussion history entries to skip.

Sample request

GET https://mytfsserver/DefaultCollection/_apis/wit/workitems/299/history?api-version=1.0

Sample response

{
  "count": 5,
  "value": [
    {
      "rev": 1,
      "value": "Jim has the most context around this.",
      "revisedBy": {
        "id": "d291b0c4-a05c-4ea6-8df1-4b41d5f39eff",
        "name": "Jamal Hartnett <fabrikamfiber4@hotmail.com>",
        "url": "https://mytfsserver/DefaultCollection/_apis/Identities/d291b0c4-a05c-4ea6-8df1-4b41d5f39eff"
      },
      "revisedDate": "2014-12-29T20:49:23.933Z",
      "url": "https://mytfsserver/DefaultCollection/_apis/wit/workItems/299/history/1"
    },
    {
      "rev": 2,
      "value": "Moving to the right area path",
      "revisedBy": {
        "id": "d291b0c4-a05c-4ea6-8df1-4b41d5f39eff",
        "name": "Jamal Hartnett <fabrikamfiber4@hotmail.com>",
        "url": "https://mytfsserver/DefaultCollection/_apis/Identities/d291b0c4-a05c-4ea6-8df1-4b41d5f39eff"
      },
      "revisedDate": "2014-12-29T20:49:24.67Z",
      "url": "https://mytfsserver/DefaultCollection/_apis/wit/workItems/299/history/2"
    },
    {
      "rev": 3,
      "value": "Johnnie is going to take this work over.",
      "revisedBy": {
        "id": "d291b0c4-a05c-4ea6-8df1-4b41d5f39eff",
        "name": "Jamal Hartnett <fabrikamfiber4@hotmail.com>",
        "url": "https://mytfsserver/DefaultCollection/_apis/Identities/d291b0c4-a05c-4ea6-8df1-4b41d5f39eff"
      },
      "revisedDate": "2014-12-29T20:49:26.99Z",
      "url": "https://mytfsserver/DefaultCollection/_apis/wit/workItems/299/history/3"
    },
    {
      "rev": 4,
      "value": "Adding the necessary spec",
      "revisedBy": {
        "id": "d291b0c4-a05c-4ea6-8df1-4b41d5f39eff",
        "name": "Jamal Hartnett <fabrikamfiber4@hotmail.com>",
        "url": "https://mytfsserver/DefaultCollection/_apis/Identities/d291b0c4-a05c-4ea6-8df1-4b41d5f39eff"
      },
      "revisedDate": "2014-12-29T20:49:27.48Z",
      "url": "https://mytfsserver/DefaultCollection/_apis/wit/workItems/299/history/4"
    },
    {
      "rev": 6,
      "value": "Linking to a blog article for context",
      "revisedBy": {
        "id": "d291b0c4-a05c-4ea6-8df1-4b41d5f39eff",
        "name": "Jamal Hartnett <fabrikamfiber4@hotmail.com>",
        "url": "https://mytfsserver/DefaultCollection/_apis/Identities/d291b0c4-a05c-4ea6-8df1-4b41d5f39eff"
      },
      "revisedDate": "2014-12-29T20:49:28.74Z",
      "url": "https://mytfsserver/DefaultCollection/_apis/wit/workItems/299/history/6"
    }
  ]
}

A page at a time

Sample request

GET https://mytfsserver/DefaultCollection/_apis/wit/workitems/299/history?$skip=1&$top=2&api-version=1.0

Sample response

{
  "count": 2,
  "value": [
    {
      "rev": 2,
      "value": "Moving to the right area path",
      "revisedBy": {
        "id": "d291b0c4-a05c-4ea6-8df1-4b41d5f39eff",
        "name": "Jamal Hartnett <fabrikamfiber4@hotmail.com>",
        "url": "https://mytfsserver/DefaultCollection/_apis/Identities/d291b0c4-a05c-4ea6-8df1-4b41d5f39eff"
      },
      "revisedDate": "2014-12-29T20:49:24.67Z",
      "url": "https://mytfsserver/DefaultCollection/_apis/wit/workItems/299/history/2"
    },
    {
      "rev": 3,
      "value": "Johnnie is going to take this work over.",
      "revisedBy": {
        "id": "d291b0c4-a05c-4ea6-8df1-4b41d5f39eff",
        "name": "Jamal Hartnett <fabrikamfiber4@hotmail.com>",
        "url": "https://mytfsserver/DefaultCollection/_apis/Identities/d291b0c4-a05c-4ea6-8df1-4b41d5f39eff"
      },
      "revisedDate": "2014-12-29T20:49:26.99Z",
      "url": "https://mytfsserver/DefaultCollection/_apis/wit/workItems/299/history/3"
    }
  ]
}

Get the discussion history of a work item revision

GET https://{instance}/DefaultCollection/_apis/wit/workitems/{id}/history/{revision}?api-version={version}
Parameter Type Notes
URL
instance string VS Team Services account ({account}.visualstudio.com) or TFS server ({server:port}).
id int ID of the work item.
revision int Revision of the work item to view discussion history.
Query
api-version string Version of the API to use.

Sample request

GET https://mytfsserver/DefaultCollection/_apis/wit/workitems/299/history/2?api-version=1.0

Sample response

{
  "rev": 2,
  "value": "Moving to the right area path",
  "revisedBy": {
    "id": "d291b0c4-a05c-4ea6-8df1-4b41d5f39eff",
    "name": "Jamal Hartnett <fabrikamfiber4@hotmail.com>",
    "url": "https://mytfsserver/DefaultCollection/_apis/Identities/d291b0c4-a05c-4ea6-8df1-4b41d5f39eff"
  },
  "revisedDate": "2014-12-29T20:49:24.67Z",
  "url": "https://mytfsserver/DefaultCollection/_apis/wit/workItems/299/history/2"
}