Recyclebin - Get

Gets a deleted work item from Recycle Bin.

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

URI Parameters

Name In Required Type Description
id
path True

integer

int32

ID of the work item to be returned

organization
path True

string

The name of the Azure DevOps organization.

project
path

string

Project ID or project name

api-version
query True

string

Version of the API to use. This should be set to '7.1' to use this version of the api.

Responses

Name Type Description
200 OK

WorkItemDelete

successful operation

Security

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

Name Description
vso.work Grants the ability to read work items, queries, boards, area and iterations paths, and other work item tracking related metadata. Also grants the ability to execute queries, search work items and to receive notifications about work item events via service hooks.

Examples

Sample request

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

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"
  }
}

Definitions

Name Description
ReferenceLinks

The class to represent a collection of REST reference links.

WorkItem

Describes a work item.

WorkItemCommentVersionRef

Represents the reference to a specific version of a comment on a Work Item.

WorkItemDelete

Full deleted work item object. Includes the work item itself.

WorkItemRelation

The class to represent a collection of REST reference links.

Name Type Description
links

object

The readonly view of the links. Because Reference links are readonly, we only want to expose them as read only.

WorkItem

Describes a work item.

Name Type Description
_links

ReferenceLinks

Link references to related REST resources.

commentVersionRef

WorkItemCommentVersionRef

Reference to a specific version of the comment added/edited/deleted in this revision.

fields

object

Map of field and values for the work item.

id

integer

The work item ID.

relations

WorkItemRelation[]

Relations of the work item.

rev

integer

Revision number of the work item.

url

string

WorkItemCommentVersionRef

Represents the reference to a specific version of a comment on a Work Item.

Name Type Description
commentId

integer

The id assigned to the comment.

createdInRevision

integer

[Internal] The work item revision where this comment was originally added.

isDeleted

boolean

[Internal] Specifies whether comment was deleted.

text

string

[Internal] The text of the comment.

url

string

version

integer

The version number.

WorkItemDelete

Full deleted work item object. Includes the work item itself.

Name Type Description
code

integer

The HTTP status code for work item operation in a batch request.

deletedBy

string

The user who deleted the work item type.

deletedDate

string

The work item deletion date.

id

integer

Work item ID.

message

string

The exception message for work item operation in a batch request.

name

string

Name or title of the work item.

project

string

Parent project of the deleted work item.

resource

WorkItem

The work item object that was deleted.

type

string

Type of work item.

url

string

REST API URL of the resource

WorkItemRelation

Name Type Description
attributes

object

Collection of link attributes.

rel

string

Relation type.

url

string

Link url.