Recyclebin - Get

从回收站获取已删除的工作项。

GET https://dev.azure.com/{organization}/{project}/_apis/wit/recyclebin/{id}?api-version=7.1-preview.2

URI 参数

名称 必需 类型 说明
id
path True

integer

int32

要返回的工作项的 ID

organization
path True

string

Azure DevOps 组织的名称。

project
path

string

项目 ID 或项目名称

api-version
query True

string

要使用的 API 版本。 应将其设置为“7.1-preview.2”才能使用此版本的 API。

响应

名称 类型 说明
200 OK

WorkItemDelete

成功的操作

安全性

oauth2

Type: oauth2
Flow: accessCode
Authorization URL: https://app.vssps.visualstudio.com/oauth2/authorize&response_type=Assertion
Token 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

Scopes

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

示例

Sample Request

GET https://dev.azure.com/fabrikam/_apis/wit/recyclebin/72?api-version=7.1-preview.2

Sample Response

{
  "id": "72",
  "type": "WorkItem",
  "Name": "72:First Workitem",
  "Project": "Fabrikam-Fiber-Git",
  "DeletedDate": "2015-01-07T18:13:01.807Z",
  "DeletedBy": "Jamal Hartnett <fabrikamfiber4@hotmail.com>",
  "url": "https://dev.azure.com/fabrikam/_apis/wit/recycleBin/72?api-version=1.0",
  "resource": {
    "id": 72,
    "rev": 1,
    "fields": {
      "System.AreaPath": "Fabrikam-Fiber-Git",
      "System.TeamProject": "Fabrikam-Fiber-Git",
      "System.IterationPath": "Fabrikam-Fiber-Git",
      "System.WorkItemType": "Product Backlog Item",
      "System.State": "New",
      "System.Reason": "New backlog item",
      "System.CreatedDate": "2015-01-07T18:13:01.807Z",
      "System.CreatedBy": "Jamal Hartnett <fabrikamfiber4@hotmail.com>",
      "System.ChangedDate": "2015-01-07T18:13:01.807Z",
      "System.ChangedBy": "Jamal Hartnett <fabrikamfiber4@hotmail.com>",
      "System.Title": "First Workitem",
      "Microsoft.VSTS.Scheduling.Effort": 8,
      "WEF_6CB513B6E70E43499D9FC94E5BBFB784_Kanban.Column": "New",
      "System.Description": "Our authorization logic needs to allow for users with Microsoft accounts (formerly Live Ids) - http://msdn.microsoft.com/en-us/library/live/hh826547.aspx"
    },
    "_links": {
      "self": {
        "href": "https://dev.azure.com/fabrikam/_apis/wit/workItems/72"
      },
      "workItemUpdates": {
        "href": "https://dev.azure.com/fabrikam/_apis/wit/workItems/72/updates"
      },
      "workItemRevisions": {
        "href": "https://dev.azure.com/fabrikam/_apis/wit/workItems/72/revisions"
      },
      "workItemHistory": {
        "href": "https://dev.azure.com/fabrikam/_apis/wit/workItems/72/history"
      },
      "html": {
        "href": "https://dev.azure.com/fabrikam/web/wi.aspx?pcguid=d81542e4-cdfa-4333-b082-1ae2d6c3ad16&id=72"
      },
      "workItemType": {
        "href": "https://dev.azure.com/fabrikam/6ce954b1-ce1f-45d1-b94d-e6bf2464ba2c/_apis/wit/workItemTypes/Product%20Backlog%20Item"
      },
      "fields": {
        "href": "https://dev.azure.com/fabrikam/_apis/wit/fields"
      }
    },
    "url": "https://dev.azure.com/fabrikam/_apis/wit/workItems/72"
  }
}

定义

名称 说明
ReferenceLinks

表示 REST 引用链接集合的类。

WorkItem

描述工作项。

WorkItemCommentVersionRef

表示对工作项上注释的特定版本的引用。

WorkItemDelete

完全删除的工作项对象。 包括工作项本身。

WorkItemRelation

表示 REST 引用链接集合的类。

名称 类型 说明
links

object

链接的只读视图。 由于引用链接是只读的,因此我们只想将其公开为只读。

WorkItem

描述工作项。

名称 类型 说明
_links

ReferenceLinks

链接对相关 REST 资源的引用。

commentVersionRef

WorkItemCommentVersionRef

对在此修订中添加/编辑/删除的特定版本的注释的引用。

fields

object

工作项的字段和值的映射。

id

integer

工作项 ID。

relations

WorkItemRelation[]

工作项的关系。

rev

integer

工作项的修订号。

url

string

WorkItemCommentVersionRef

表示对工作项上注释的特定版本的引用。

名称 类型 说明
commentId

integer

分配给注释的 ID。

createdInRevision

integer

[内部]最初添加此注释的工作项修订。

isDeleted

boolean

[内部]指定是否删除注释。

text

string

[内部]注释的文本。

url

string

version

integer

版本号。

WorkItemDelete

完全删除的工作项对象。 包括工作项本身。

名称 类型 说明
code

integer

批处理请求中工作项操作的 HTTP 状态代码。

deletedBy

string

删除工作项类型的用户。

deletedDate

string

工作项删除日期。

id

integer

工作项 ID。

message

string

批处理请求中工作项操作的异常消息。

name

string

工作项的名称或标题。

project

string

已删除工作项的父项目。

resource

WorkItem

已删除的工作项对象。

type

string

工作项的类型。

url

string

资源的 REST API URL

WorkItemRelation

名称 类型 说明
attributes

object

链接属性的集合。

rel

string

关系类型。

url

string

链接 URL。