Shelvesets - List
Return a collection of shallow shelveset references.
GET https://{instance}/{collection}/_apis/tfvc/shelvesets?api-version=4.1
GET https://{instance}/{collection}/_apis/tfvc/shelvesets?requestData.includeLinks={requestData.includeLinks}&requestData.includeWorkItems={requestData.includeWorkItems}&requestData.includeDetails={requestData.includeDetails}&requestData.maxChangeCount={requestData.maxChangeCount}&requestData.maxCommentLength={requestData.maxCommentLength}&requestData.owner={requestData.owner}&requestData.name={requestData.name}&$top={$top}&$skip={$skip}&api-version=4.1
URI Parameters
Name | In | Required | Type | Description |
---|---|---|---|---|
collection
|
path | True |
string |
The name of the Team Foundation Server collection. |
instance
|
path | True |
string |
TFS server name ({server:port}) |
api-version
|
query | True |
string |
Version of the API to use. This should be set to '4.1' to use this version of the api. |
$skip
|
query |
integer (int32) |
Number of shelvesets to skip |
|
$top
|
query |
integer (int32) |
Max number of shelvesets to return |
|
request
|
query |
boolean |
Whether to include policyOverride and notes Only applies when requesting a single deep shelveset |
|
request
|
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. |
|
request
|
query |
boolean |
Whether to include workItems |
|
request
|
query |
integer (int32) |
Max number of changes to include |
|
request
|
query |
integer (int32) |
Max length of comment |
|
request
|
query |
string |
Shelveset's name |
|
request
|
query |
string |
Owner's ID. Could be a name or a guid. |
Responses
Name | Type | Description |
---|---|---|
200 OK |
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 get notified about version control events via service hooks. |
Examples
Shelveset |
top and skip |
work |
ShelvesetId and Changes
Sample request
GET https://{instance}/{collection}/_apis/tfvc/shelvesets?api-version=4.1
Sample response
{
"count": 4,
"value": [
{
"item": {
"version": 9,
"path": "$/Fabrikam-Fiber-TFVC/AuthSample/Code/App.config",
"url": "https://fabrikam:8080/tfs/_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://fabrikam:8080/tfs/_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://fabrikam:8080/tfs/_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://fabrikam:8080/tfs/_apis/tfvc/items/%24/Fabrikam-Fiber-TFVC/AuthSample/Code/Properties/AssemblyInfo.cs?versionType=Shelveset&version=My%20first%20shelveset%3Bfabrikamfiber16%40hotmail.com"
},
"changeType": "delete"
}
]
}
top and skip
Sample request
GET https://{instance}/{collection}/_apis/tfvc/shelvesets?$top=2&$skip=2&api-version=4.1
Sample response
{
"count": 2,
"value": [
{
"item": {
"path": "$/Fabrikam-Fiber-TFVC/AuthSample/Code/FabrikamEngine.cs",
"url": "https://fabrikam:8080/tfs/_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://fabrikam:8080/tfs/_apis/tfvc/items/%24/Fabrikam-Fiber-TFVC/AuthSample/Code/Properties/AssemblyInfo.cs?versionType=Shelveset&version=My%20first%20shelveset%3Bfabrikamfiber16%40hotmail.com"
},
"changeType": "delete"
}
]
}
workItems
Sample request
GET https://{instance}/{collection}/_apis/tfvc/shelvesets?api-version=4.1
Sample response
{
"count": 1,
"value": [
{
"webUrl": "https://fabrikam:8080/tfs/web/wi.aspx?pcguid=d81542e4-cdfa-4333-b082-1ae2d6c3ad16&id=22",
"id": 22,
"title": "Wrong output",
"workItemType": "Bug",
"state": "Done"
}
]
}
Definitions
Name | Description |
---|---|
Identity |
|
Reference |
The class to represent a collection of REST reference links. |
Tfvc |
This is the shallow shelveset class |
IdentityRef
Name | Type | Description |
---|---|---|
_links |
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 Collections. |
directoryAlias |
string |
|
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 |
|
inactive |
boolean |
|
isAadIdentity |
boolean |
|
isContainer |
boolean |
|
profileUrl |
string |
|
uniqueName |
string |
|
url |
string |
This url is the full route to the source resource of this graph subject. |
ReferenceLinks
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. |
TfvcShelvesetRef
This is the shallow shelveset class
Name | Type | Description |
---|---|---|
_links |
The class to represent a collection of REST reference links. |
|
comment |
string |
|
commentTruncated |
boolean |
|
createdDate |
string (date-time) |
|
id |
string |
|
name |
string |
|
owner | ||
url |
string |