Shelvesets - Get

Get a single deep shelveset.

GET https://dev.azure.com/{organization}/_apis/tfvc/shelvesets?shelvesetId={shelvesetId}&api-version=7.1-preview.1
GET https://dev.azure.com/{organization}/_apis/tfvc/shelvesets?shelvesetId={shelvesetId}&requestData.includeDetails={requestData.includeDetails}&requestData.includeLinks={requestData.includeLinks}&requestData.includeWorkItems={requestData.includeWorkItems}&requestData.maxChangeCount={requestData.maxChangeCount}&requestData.maxCommentLength={requestData.maxCommentLength}&requestData.name={requestData.name}&requestData.owner={requestData.owner}&api-version=7.1-preview.1

URI Parameters

Name In Required Type Description
organization
path True

string

The name of the Azure DevOps organization.

api-version
query True

string

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

shelvesetId
query True

string

Shelveset's unique ID

requestData.includeDetails
query

boolean

Whether to include policyOverride and notes Only applies when requesting a single deep shelveset

requestData.includeLinks
query

boolean

Whether to include the _links field on the shallow references. Does not apply when requesting a single deep shelveset object. Links will always be included in the deep shelveset.

requestData.includeWorkItems
query

boolean

Whether to include workItems

requestData.maxChangeCount
query

integer

int32

Max number of changes to include

requestData.maxCommentLength
query

integer

int32

Max length of comment

requestData.name
query

string

Shelveset name

requestData.owner
query

string

Owner's ID. Could be a name or a guid.

Responses

Name Type Description
200 OK

TfvcShelveset

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.code Grants the ability to read source code and metadata about commits, changesets, branches, and other version control artifacts. Also grants the ability to search code and get notified about version control events via service hooks.

Examples

GET a specific Shelveset with a comment lenght limit.
GET a specific Shelveset with associated changes.
GET a specific Shelveset with associated workitems.
GET a specific Shelveset with details.
GET a specific Shelveset.

GET a specific Shelveset with a comment lenght limit.

Sample Request

GET https://dev.azure.com/fabrikam/_apis/tfvc/shelvesets?shelvesetId=My first shelveset;d6245f20-2af8-44f4-9451-8107cb2767db&api-version=7.1-preview.1

Sample Response

{
  "name": "My first shelveset",
  "id": "My first shelveset;d6245f20-2af8-44f4-9451-8107cb2767db",
  "owner": {
    "id": "d6245f20-2af8-44f4-9451-8107cb2767db",
    "displayName": "Normal Paulk",
    "uniqueName": "fabrikamfiber16@hotmail.com",
    "url": "https://vssps.dev.azure.com/fabrikam/_apis/Identities/d6245f20-2af8-44f4-9451-8107cb2767db",
    "imageUrl": "https://dev.azure.com/fabrikam/_api/_common/identityImage?id=d6245f20-2af8-44f4-9451-8107cb2767db"
  },
  "createdDate": "2014-07-18T03:37:52.277Z",
  "comment": "Here i",
  "commentTruncated": true,
  "url": "https://dev.azure.com/fabrikam/_apis/tfvc/shelvesets/My%20first%20shelveset%3bd6245f20-2af8-44f4-9451-8107cb2767db",
  "_links": {
    "self": {
      "href": "https://dev.azure.com/fabrikam/_apis/tfvc/shelvesets/My%20first%20shelveset%3bd6245f20-2af8-44f4-9451-8107cb2767db"
    },
    "changes": {
      "href": "https://dev.azure.com/fabrikam/_apis/tfvc/shelvesets/My%20first%20shelveset%3bd6245f20-2af8-44f4-9451-8107cb2767db/changes"
    },
    "workItems": {
      "href": "https://dev.azure.com/fabrikam/_apis/tfvc/shelvesets/My%20first%20shelveset%3bd6245f20-2af8-44f4-9451-8107cb2767db/workitems"
    },
    "owner": {
      "href": "https://vssps.dev.azure.com/fabrikam/_apis/Identities/d6245f20-2af8-44f4-9451-8107cb2767db"
    }
  }
}

GET a specific Shelveset with associated changes.

Sample Request

GET https://dev.azure.com/fabrikam/_apis/tfvc/shelvesets?shelvesetId=My first shelveset;d6245f20-2af8-44f4-9451-8107cb2767db&requestData.maxChangeCount=100&api-version=7.1-preview.1

Sample Response

{
  "changes": [
    {
      "item": {
        "version": 9,
        "path": "$/Fabrikam-Fiber-TFVC/AuthSample/Code/App.config",
        "url": "https://dev.azure.com/fabrikam/_apis/tfvc/items/%24/Fabrikam-Fiber-TFVC/AuthSample/Code/App.config?versionType=Shelveset&version=My%20first%20shelveset%3Bfabrikamfiber16%40hotmail.com"
      },
      "changeType": "edit"
    },
    {
      "item": {
        "version": 9,
        "path": "$/Fabrikam-Fiber-TFVC/AuthSample/Code/AuthSample.csproj",
        "url": "https://dev.azure.com/fabrikam/_apis/tfvc/items/%24/Fabrikam-Fiber-TFVC/AuthSample/Code/AuthSample.csproj?versionType=Shelveset&version=My%20first%20shelveset%3Bfabrikamfiber16%40hotmail.com"
      },
      "changeType": "edit"
    },
    {
      "item": {
        "path": "$/Fabrikam-Fiber-TFVC/AuthSample/Code/FabrikamEngine.cs",
        "url": "https://dev.azure.com/fabrikam/_apis/tfvc/items/%24/Fabrikam-Fiber-TFVC/AuthSample/Code/FabrikamEngine.cs?versionType=Shelveset&version=My%20first%20shelveset%3Bfabrikamfiber16%40hotmail.com"
      },
      "changeType": "add, edit, encoding"
    },
    {
      "item": {
        "version": 9,
        "path": "$/Fabrikam-Fiber-TFVC/AuthSample/Code/Properties/AssemblyInfo.cs",
        "url": "https://dev.azure.com/fabrikam/_apis/tfvc/items/%24/Fabrikam-Fiber-TFVC/AuthSample/Code/Properties/AssemblyInfo.cs?versionType=Shelveset&version=My%20first%20shelveset%3Bfabrikamfiber16%40hotmail.com"
      },
      "changeType": "delete"
    }
  ],
  "name": "My first shelveset",
  "id": "My first shelveset;d6245f20-2af8-44f4-9451-8107cb2767db",
  "owner": {
    "id": "d6245f20-2af8-44f4-9451-8107cb2767db",
    "displayName": "Normal Paulk",
    "uniqueName": "fabrikamfiber16@hotmail.com",
    "url": "https://vssps.dev.azure.com/fabrikam/_apis/Identities/d6245f20-2af8-44f4-9451-8107cb2767db",
    "imageUrl": "https://dev.azure.com/fabrikam/_api/_common/identityImage?id=d6245f20-2af8-44f4-9451-8107cb2767db"
  },
  "createdDate": "2014-07-18T03:37:52.277Z",
  "comment": "Here is a really long comment describing this shelveset.",
  "url": "https://dev.azure.com/fabrikam/_apis/tfvc/shelvesets/My%20first%20shelveset%3bd6245f20-2af8-44f4-9451-8107cb2767db",
  "_links": {
    "self": {
      "href": "https://dev.azure.com/fabrikam/_apis/tfvc/shelvesets/My%20first%20shelveset%3bd6245f20-2af8-44f4-9451-8107cb2767db"
    },
    "changes": {
      "href": "https://dev.azure.com/fabrikam/_apis/tfvc/shelvesets/My%20first%20shelveset%3bd6245f20-2af8-44f4-9451-8107cb2767db/changes"
    },
    "workItems": {
      "href": "https://dev.azure.com/fabrikam/_apis/tfvc/shelvesets/My%20first%20shelveset%3bd6245f20-2af8-44f4-9451-8107cb2767db/workitems"
    },
    "owner": {
      "href": "https://vssps.dev.azure.com/fabrikam/_apis/Identities/d6245f20-2af8-44f4-9451-8107cb2767db"
    }
  }
}

GET a specific Shelveset with associated workitems.

Sample Request

GET https://dev.azure.com/fabrikam/_apis/tfvc/shelvesets?shelvesetId=My first shelveset;d6245f20-2af8-44f4-9451-8107cb2767db&requestData.includeWorkItems=true&api-version=7.1-preview.1

Sample Response

{
  "workItems": [
    {
      "webUrl": "https://dev.azure.com/fabrikam/web/wi.aspx?pcguid=d81542e4-cdfa-4333-b082-1ae2d6c3ad16&id=22",
      "id": 22,
      "title": "Wrong output",
      "workItemType": "Bug",
      "state": "Done"
    }
  ],
  "name": "My first shelveset",
  "id": "My first shelveset;d6245f20-2af8-44f4-9451-8107cb2767db",
  "owner": {
    "id": "d6245f20-2af8-44f4-9451-8107cb2767db",
    "displayName": "Normal Paulk",
    "uniqueName": "fabrikamfiber16@hotmail.com",
    "url": "https://vssps.dev.azure.com/fabrikam/_apis/Identities/d6245f20-2af8-44f4-9451-8107cb2767db",
    "imageUrl": "https://dev.azure.com/fabrikam/_api/_common/identityImage?id=d6245f20-2af8-44f4-9451-8107cb2767db"
  },
  "createdDate": "2014-07-18T03:37:52.277Z",
  "comment": "Here is a really long comment describing this shelveset.",
  "url": "https://dev.azure.com/fabrikam/_apis/tfvc/shelvesets/My%20first%20shelveset%3bd6245f20-2af8-44f4-9451-8107cb2767db",
  "_links": {
    "self": {
      "href": "https://dev.azure.com/fabrikam/_apis/tfvc/shelvesets/My%20first%20shelveset%3bd6245f20-2af8-44f4-9451-8107cb2767db"
    },
    "changes": {
      "href": "https://dev.azure.com/fabrikam/_apis/tfvc/shelvesets/My%20first%20shelveset%3bd6245f20-2af8-44f4-9451-8107cb2767db/changes"
    },
    "workItems": {
      "href": "https://dev.azure.com/fabrikam/_apis/tfvc/shelvesets/My%20first%20shelveset%3bd6245f20-2af8-44f4-9451-8107cb2767db/workitems"
    },
    "owner": {
      "href": "https://vssps.dev.azure.com/fabrikam/_apis/Identities/d6245f20-2af8-44f4-9451-8107cb2767db"
    }
  }
}

GET a specific Shelveset with details.

Sample Request

GET https://dev.azure.com/fabrikam/_apis/tfvc/shelvesets?shelvesetId=My first shelveset;d6245f20-2af8-44f4-9451-8107cb2767db&requestData.includeDetails=true&api-version=7.1-preview.1

Sample Response

{
  "policyOverride": {
    "policyFailures": []
  },
  "notes": [],
  "name": "My first shelveset",
  "id": "My first shelveset;d6245f20-2af8-44f4-9451-8107cb2767db",
  "owner": {
    "id": "d6245f20-2af8-44f4-9451-8107cb2767db",
    "displayName": "Normal Paulk",
    "uniqueName": "fabrikamfiber16@hotmail.com",
    "url": "https://vssps.dev.azure.com/fabrikam/_apis/Identities/d6245f20-2af8-44f4-9451-8107cb2767db",
    "imageUrl": "https://dev.azure.com/fabrikam/_api/_common/identityImage?id=d6245f20-2af8-44f4-9451-8107cb2767db"
  },
  "createdDate": "2014-07-18T03:37:52.277Z",
  "comment": "Here is a really long comment describing this shelveset.",
  "url": "https://dev.azure.com/fabrikam/_apis/tfvc/shelvesets/My%20first%20shelveset%3bd6245f20-2af8-44f4-9451-8107cb2767db",
  "_links": {
    "self": {
      "href": "https://dev.azure.com/fabrikam/_apis/tfvc/shelvesets/My%20first%20shelveset%3bd6245f20-2af8-44f4-9451-8107cb2767db"
    },
    "changes": {
      "href": "https://dev.azure.com/fabrikam/_apis/tfvc/shelvesets/My%20first%20shelveset%3bd6245f20-2af8-44f4-9451-8107cb2767db/changes"
    },
    "workItems": {
      "href": "https://dev.azure.com/fabrikam/_apis/tfvc/shelvesets/My%20first%20shelveset%3bd6245f20-2af8-44f4-9451-8107cb2767db/workitems"
    },
    "owner": {
      "href": "https://vssps.dev.azure.com/fabrikam/_apis/Identities/d6245f20-2af8-44f4-9451-8107cb2767db"
    }
  }
}

GET a specific Shelveset.

Sample Request

GET https://dev.azure.com/fabrikam/_apis/tfvc/shelvesets?shelvesetId=My first shelveset;d6245f20-2af8-44f4-9451-8107cb2767db&api-version=7.1-preview.1

Sample Response

{
  "name": "My first shelveset",
  "id": "My first shelveset;d6245f20-2af8-44f4-9451-8107cb2767db",
  "owner": {
    "id": "d6245f20-2af8-44f4-9451-8107cb2767db",
    "displayName": "Normal Paulk",
    "uniqueName": "fabrikamfiber16@hotmail.com",
    "url": "https://vssps.dev.azure.com/fabrikam/_apis/Identities/d6245f20-2af8-44f4-9451-8107cb2767db",
    "imageUrl": "https://dev.azure.com/fabrikam/_api/_common/identityImage?id=d6245f20-2af8-44f4-9451-8107cb2767db"
  },
  "createdDate": "2014-07-18T03:37:52.277Z",
  "comment": "Here is a really long comment describing this shelveset.",
  "url": "https://dev.azure.com/fabrikam/_apis/tfvc/shelvesets/My%20first%20shelveset%3bd6245f20-2af8-44f4-9451-8107cb2767db",
  "_links": {
    "self": {
      "href": "https://dev.azure.com/fabrikam/_apis/tfvc/shelvesets/My%20first%20shelveset%3bd6245f20-2af8-44f4-9451-8107cb2767db"
    },
    "changes": {
      "href": "https://dev.azure.com/fabrikam/_apis/tfvc/shelvesets/My%20first%20shelveset%3bd6245f20-2af8-44f4-9451-8107cb2767db/changes"
    },
    "workItems": {
      "href": "https://dev.azure.com/fabrikam/_apis/tfvc/shelvesets/My%20first%20shelveset%3bd6245f20-2af8-44f4-9451-8107cb2767db/workitems"
    },
    "owner": {
      "href": "https://vssps.dev.azure.com/fabrikam/_apis/Identities/d6245f20-2af8-44f4-9451-8107cb2767db"
    }
  }
}

Definitions

Name Description
AssociatedWorkItem
CheckinNote
IdentityRef
ItemContent
ItemContentType
ReferenceLinks

The class to represent a collection of REST reference links.

TfvcChange

A change.

TfvcMergeSource
TfvcPolicyFailureInfo

Policy failure information.

TfvcPolicyOverrideInfo

Information on the policy override.

TfvcShelveset

Metadata for a shelveset.

VersionControlChangeType

The type of change that was made to the item.

AssociatedWorkItem

Name Type Description
assignedTo

string

id

integer

Id of associated the work item.

state

string

title

string

url

string

REST Url of the work item.

webUrl

string

workItemType

string

CheckinNote

Name Type Description
name

string

value

string

IdentityRef

Name Type Description
_links

ReferenceLinks

This field contains zero or more interesting links about the graph subject. These links may be invoked to obtain additional relationships or more detailed information about this graph subject.

descriptor

string

The descriptor is the primary way to reference the graph subject while the system is running. This field will uniquely identify the same graph subject across both Accounts and Organizations.

directoryAlias

string

Deprecated - Can be retrieved by querying the Graph user referenced in the "self" entry of the IdentityRef "_links" dictionary

displayName

string

This is the non-unique display name of the graph subject. To change this field, you must alter its value in the source provider.

id

string

imageUrl

string

Deprecated - Available in the "avatar" entry of the IdentityRef "_links" dictionary

inactive

boolean

Deprecated - Can be retrieved by querying the Graph membership state referenced in the "membershipState" entry of the GraphUser "_links" dictionary

isAadIdentity

boolean

Deprecated - Can be inferred from the subject type of the descriptor (Descriptor.IsAadUserType/Descriptor.IsAadGroupType)

isContainer

boolean

Deprecated - Can be inferred from the subject type of the descriptor (Descriptor.IsGroupType)

isDeletedInOrigin

boolean

profileUrl

string

Deprecated - not in use in most preexisting implementations of ToIdentityRef

uniqueName

string

Deprecated - use Domain+PrincipalName instead

url

string

This url is the full route to the source resource of this graph subject.

ItemContent

Name Type Description
content

string

contentType

ItemContentType

ItemContentType

Name Type Description
base64Encoded

string

rawText

string

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.

TfvcChange

A change.

Name Type Description
changeType

VersionControlChangeType

The type of change that was made to the item.

item

string

Current version.

mergeSources

TfvcMergeSource[]

List of merge sources in case of rename or branch creation.

newContent

ItemContent

Content of the item after the change.

pendingVersion

integer

Version at which a (shelved) change was pended against

sourceServerItem

string

Path of the item on the server.

url

string

URL to retrieve the item.

TfvcMergeSource

Name Type Description
isRename

boolean

Indicates if this a rename source. If false, it is a merge source.

serverItem

string

The server item of the merge source.

versionFrom

integer

Start of the version range.

versionTo

integer

End of the version range.

TfvcPolicyFailureInfo

Policy failure information.

Name Type Description
message

string

Policy failure message.

policyName

string

Name of the policy that failed.

TfvcPolicyOverrideInfo

Information on the policy override.

Name Type Description
comment

string

Overidden policy comment.

policyFailures

TfvcPolicyFailureInfo[]

Information on the failed policy that was overridden.

TfvcShelveset

Metadata for a shelveset.

Name Type Description
_links

ReferenceLinks

List of reference links for the shelveset.

changes

TfvcChange[]

List of changes.

comment

string

Shelveset comment.

commentTruncated

boolean

Shelveset comment truncated as applicable.

createdDate

string

Shelveset create date.

id

string

Shelveset Id.

name

string

Shelveset name.

notes

CheckinNote[]

List of checkin notes.

owner

IdentityRef

Shelveset Owner.

policyOverride

TfvcPolicyOverrideInfo

Policy override information if applicable.

url

string

Shelveset Url.

workItems

AssociatedWorkItem[]

List of associated workitems.

VersionControlChangeType

The type of change that was made to the item.

Name Type Description
add

string

all

string

branch

string

delete

string

edit

string

encoding

string

lock

string

merge

string

none

string

property

string

rename

string

rollback

string

sourceRename

string

targetRename

string

undelete

string