Reporting Work Item Revisions - Read Reporting Revisions Get

获取包含已删除项的选项的一批工作项修订

GET https://dev.azure.com/{organization}/{project}/_apis/wit/reporting/workitemrevisions?api-version=7.1
GET https://dev.azure.com/{organization}/{project}/_apis/wit/reporting/workitemrevisions?fields={fields}&types={types}&continuationToken={continuationToken}&startDateTime={startDateTime}&includeIdentityRef={includeIdentityRef}&includeDeleted={includeDeleted}&includeTagRef={includeTagRef}&includeLatestOnly={includeLatestOnly}&$expand={$expand}&includeDiscussionChangesOnly={includeDiscussionChangesOnly}&$maxPageSize={$maxPageSize}&api-version=7.1

URI 参数

名称 必需 类型 说明
organization
path True

string

Azure DevOps 组织的名称。

project
path

string

项目 ID 或项目名称

api-version
query True

string

要使用的 API 版本。 这应设置为“7.1”才能使用此版本的 API。

$expand
query

ReportingRevisionsExpand

返回工作项修订中的所有字段,包括默认未返回的长文本字段

$maxPageSize
query

integer (int32)

此批中要返回的最大结果数

continuationToken
query

string

指定要从中启动批处理的水印。 省略此参数以获取第一批修订。

fields
query

string (array (string))

在工作项修订中返回的字段列表。 省略此参数以获取所有可报告字段。

includeDeleted
query

boolean

指定是否应返回已删除的项目。

includeDiscussionChangesOnly
query

boolean

仅返回工作项的修订,其中仅更改了历史记录字段

includeIdentityRef
query

boolean

返回标识引用,而不是标识字段的字符串值。

includeLatestOnly
query

boolean

仅返回工作项的最新修订,跳过所有历史修订

includeTagRef
query

boolean

指定是否应为 System.Tags 字段返回标记对象。

startDateTime
query

string (date-time)

用作修订起点的日期/时间,所有修订都将在此日期/时间之后发生。 不能与“水印”参数结合使用。

types
query

string (array (string))

用于将结果筛选为特定工作项类型的类型列表。 省略此参数以获取所有工作项类型的工作项修订。

响应

名称 类型 说明
200 OK

ReportingWorkItemRevisionsBatch

成功作

安全性

oauth2

类型: oauth2
流向: accessCode
授权 URL: https://app.vssps.visualstudio.com/oauth2/authorize&response_type=Assertion
令牌 URL: https://app.vssps.visualstudio.com/oauth2/token?client_assertion_type=urn:ietf:params:oauth:client-assertion-type:jwt-bearer&grant_type=urn:ietf:params:oauth:grant-type:jwt-bearer

作用域

名称 说明
vso.work 授予读取工作项、查询、版块、区域和迭代路径以及其他工作项跟踪相关元数据的能力。 此外,还授予执行查询、搜索工作项以及通过服务挂钩接收有关工作项事件的通知的能力。

示例

Get a batch of work item revisions with identity references
Get the first batch of work item revisions

Get a batch of work item revisions with identity references

示例请求

GET https://dev.azure.com/fabrikam/_apis/wit/reporting/workitemrevisions?includeIdentityRef=true&api-version=7.1

示例响应

{
  "values": [
    {
      "id": 3,
      "rev": 8,
      "fields": {
        "System.Id": 3,
        "System.AreaPath": "Fabrikam-Fiber-Git",
        "System.TeamProject": "Fabrikam-Fiber-Git",
        "System.Rev": 8,
        "System.RevisedDate": "9999-01-01T00:00:00Z",
        "System.IterationPath": "Fabrikam-Fiber-Git\\Release 1\\Sprint 1",
        "System.WorkItemType": "Product Backlog Item",
        "System.State": "Done",
        "System.Reason": "Work finished",
        "System.CreatedDate": "2014-03-18T17:17:06.857Z",
        "System.CreatedBy": {
          "id": "d291b0c4-a05c-4ea6-8df1-4b41d5f39eff",
          "uniqueName": "Jamal Hartnett <fabrikamfiber4@hotmail.com>"
        },
        "System.ChangedDate": "2015-06-23T18:25:16.137Z",
        "System.ChangedBy": {
          "id": "d6245f20-2af8-44f4-9451-8107cb2767db",
          "uniqueName": "Normal Paulk <fabrikamfiber16@hotmail.com>"
        },
        "System.Title": "Technician can submit invoices on Windows Phone",
        "System.BoardColumn": "Done",
        "Microsoft.VSTS.Common.ClosedDate": "2014-03-18T17:19:02.093Z",
        "Microsoft.VSTS.Common.Priority": 3,
        "Microsoft.VSTS.Common.BacklogPriority": 1000063244,
        "WEF_6CB513B6E70E43499D9FC94E5BBFB784_Kanban.Column": "Done"
      }
    },
    {
      "id": 350,
      "rev": 1,
      "fields": {
        "System.Id": 350,
        "System.AreaPath": "Fabrikam-Fiber-Git",
        "System.TeamProject": "Fabrikam-Fiber-Git",
        "System.Rev": 1,
        "System.RevisedDate": "9999-01-01T00:00:00Z",
        "System.IterationPath": "Fabrikam-Fiber-Git",
        "System.WorkItemType": "Epic",
        "System.State": "New",
        "System.Reason": "New epic",
        "System.CreatedDate": "2015-08-25T21:54:46.06Z",
        "System.CreatedBy": {
          "id": "d291b0c4-a05c-4ea6-8df1-4b41d5f39eff",
          "uniqueName": "Jamal Hartnett <fabrikamfiber4@hotmail.com>"
        },
        "System.ChangedDate": "2015-08-25T21:54:46.06Z",
        "System.ChangedBy": {
          "id": "d291b0c4-a05c-4ea6-8df1-4b41d5f39eff",
          "uniqueName": "Jamal Hartnett <fabrikamfiber4@hotmail.com>"
        },
        "System.Title": "Mobile Experiences",
        "System.BoardColumn": "New",
        "System.BoardColumnDone": false,
        "Microsoft.VSTS.Common.Priority": 2,
        "WEF_DF2CD50AB7B849C795850408B629AB43_Kanban.Column": "New",
        "WEF_DF2CD50AB7B849C795850408B629AB43_Kanban.Column.Done": false
      }
    }
  ],
  "nextLink": "https://dev.azure.com/fabrikam/_apis/wit/reporting/workItemRevisions?continuationToken=813;350;1&includeIdentityRef=true&api-version=2.0",
  "continuationToken": "813;350;1",
  "isLastBatch": true
}

Get the first batch of work item revisions

示例请求

GET https://dev.azure.com/fabrikam/_apis/wit/reporting/workitemrevisions?api-version=7.1

示例响应

{
  "values": [
    {
      "id": 1,
      "rev": 1,
      "fields": {
        "System.Id": 1,
        "System.AreaPath": "Fabrikam-Fiber-Git",
        "System.TeamProject": "Fabrikam-Fiber-Git",
        "System.Rev": 1,
        "System.RevisedDate": "2014-03-18T17:17:05.76Z",
        "System.IterationPath": "Fabrikam-Fiber-Git",
        "System.WorkItemType": "Product Backlog Item",
        "System.State": "New",
        "System.Reason": "New backlog item",
        "System.CreatedDate": "2014-03-18T17:16:56.25Z",
        "System.CreatedBy": "Jamal Hartnett <fabrikamfiber4@hotmail.com>",
        "System.ChangedDate": "2014-03-18T17:16:56.25Z",
        "System.ChangedBy": "Jamal Hartnett <fabrikamfiber4@hotmail.com>",
        "System.BoardColumn": "New",
        "WEF_6CB513B6E70E43499D9FC94E5BBFB784_Kanban.Column": "New",
        "System.Title": "Technician can check on parts orders on Windows Phone"
      }
    },
    {
      "id": 1,
      "rev": 2,
      "fields": {
        "System.Id": 1,
        "System.AreaPath": "Fabrikam-Fiber-Git",
        "System.TeamProject": "Fabrikam-Fiber-Git",
        "System.Rev": 2,
        "System.RevisedDate": "2014-03-18T17:19:02.093Z",
        "System.IterationPath": "Fabrikam-Fiber-Git",
        "System.WorkItemType": "Product Backlog Item",
        "System.State": "New",
        "System.Reason": "New backlog item",
        "System.CreatedDate": "2014-03-18T17:16:56.25Z",
        "System.CreatedBy": "Jamal Hartnett <fabrikamfiber4@hotmail.com>",
        "System.ChangedDate": "2014-03-18T17:17:05.76Z",
        "System.ChangedBy": "Jamal Hartnett <fabrikamfiber4@hotmail.com>",
        "System.BoardColumn": "New",
        "WEF_6CB513B6E70E43499D9FC94E5BBFB784_Kanban.Column": "New",
        "System.Title": "Technician can check on parts orders on Windows Phone",
        "Microsoft.VSTS.Common.BacklogPriority": 1000000000
      }
    },
    {
      "id": 2,
      "rev": 1,
      "fields": {
        "System.Id": 2,
        "System.AreaPath": "Fabrikam-Fiber-Git",
        "System.TeamProject": "Fabrikam-Fiber-Git",
        "System.Rev": 1,
        "System.RevisedDate": "2014-03-18T17:17:06.343Z",
        "System.IterationPath": "Fabrikam-Fiber-Git",
        "System.WorkItemType": "Product Backlog Item",
        "System.State": "New",
        "System.Reason": "New backlog item",
        "System.CreatedDate": "2014-03-18T17:17:06.01Z",
        "System.CreatedBy": "Jamal Hartnett <fabrikamfiber4@hotmail.com>",
        "System.ChangedDate": "2014-03-18T17:17:06.01Z",
        "System.ChangedBy": "Jamal Hartnett <fabrikamfiber4@hotmail.com>",
        "System.BoardColumn": "New",
        "WEF_6CB513B6E70E43499D9FC94E5BBFB784_Kanban.Column": "New",
        "System.Title": "Technician can look for closest hardware store from Windows Phone"
      }
    }
  ],
  "nextLink": "https://dev.azure.com/fabrikam/_apis/wit/reporting/workItemRevisions?continuationToken=3;2;1&api-version=2.0",
  "isLastBatch": true
}

定义

名称 说明
ReportingRevisionsExpand

返回工作项修订中的所有字段,包括默认未返回的长文本字段

ReportingWorkItemRevisionsBatch

ReportingRevisionsExpand

返回工作项修订中的所有字段,包括默认未返回的长文本字段

说明
fields

向响应添加字段。

none

默认行为。

ReportingWorkItemRevisionsBatch

名称 类型 说明
continuationToken

string

ContinuationToken 充当水印。 查询大型结果时使用。

isLastBatch

boolean

如果它是最后一批,则返回“true”;否则返回“false”。

nextLink

string

工作项的下一个链接。

values

string[] (T)

rel、sourceId、TargetId、ChangedDate、isActive 等值。