Changesets - Get
Retrieve a Tfvc Changeset
GET https://dev.azure.com/{organization}/{project}/_apis/tfvc/changesets/{id}?api-version=5.0
GET https://dev.azure.com/{organization}/{project}/_apis/tfvc/changesets/{id}?maxChangeCount={maxChangeCount}&includeDetails={includeDetails}&includeWorkItems={includeWorkItems}&maxCommentLength={maxCommentLength}&includeSourceRename={includeSourceRename}&$skip={$skip}&$top={$top}&$orderby={$orderby}&searchCriteria.includeLinks={searchCriteria.includeLinks}&searchCriteria.followRenames={searchCriteria.followRenames}&searchCriteria.toId={searchCriteria.toId}&searchCriteria.fromId={searchCriteria.fromId}&searchCriteria.toDate={searchCriteria.toDate}&searchCriteria.fromDate={searchCriteria.fromDate}&searchCriteria.author={searchCriteria.author}&searchCriteria.itemPath={searchCriteria.itemPath}&api-version=5.0
URI Parameters
Name | In | Required | Type | Description |
---|---|---|---|---|
id
|
path | True |
integer (int32) |
Changeset Id to retrieve. |
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 '5.0' to use this version of the api. |
$orderby
|
query |
string |
Results are sorted by ID in descending order by default. Use id asc to sort by ID in ascending order. |
|
$skip
|
query |
integer (int32) |
Number of results to skip. Default: null |
|
$top
|
query |
integer (int32) |
The maximum number of results to return. Default: null |
|
include
|
query |
boolean |
Include policy details and check-in notes in the response. Default: false |
|
include
|
query |
boolean |
Include renames. Default: false |
|
include
|
query |
boolean |
Include workitems. Default: false |
|
max
|
query |
integer (int32) |
Number of changes to return (maximum 100 changes) Default: 0 |
|
max
|
query |
integer (int32) |
Include details about associated work items in the response. Default: null |
|
search
|
query |
string |
Alias or display name of user who made the changes. |
|
search
|
query |
boolean |
Whether or not to follow renames for the given item being queried. |
|
search
|
query |
string |
If provided, only include changesets created after this date (string). |
|
search
|
query |
integer (int32) |
If provided, only include changesets after this changesetID. |
|
search
|
query |
boolean |
Whether to include the _links field on the shallow references. |
|
search
|
query |
string |
Path of item to search under. |
|
search
|
query |
string |
If provided, only include changesets created before this date (string). |
|
search
|
query |
integer (int32) |
If provided, a version descriptor for the latest change list to include. |
Request Body
Name | Type | Description |
---|---|---|
searchCriteria.mappings |
Following criteria available (.itemPath, .version, .versionType, .versionOption, .author, .fromId, .toId, .fromDate, .toDate) Default: null |
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 search code and get notified about version control events via service hooks. |
Examples
GET a changeset |
Get a changeset with a max number of changes. |
Get a changeset with policy details and check-in notes. |
Get a changeset with workitems. |
GET a changeset
Sample request
GET https://dev.azure.com/fabrikam/_apis/tfvc/changesets/16?api-version=5.0
Sample response
{
"changesetId": 16,
"url": "https://dev.azure.com/fabrikam/_apis/tfvc/changesets/16",
"author": {
"id": "8c8c7d32-6b1b-47f4-b2e9-30b477b5ab3d",
"displayName": "Chuck Reinhart",
"uniqueName": "[email protected]",
"url": "https://vssps.dev.azure.com/fabrikam/_apis/Identities/8c8c7d32-6b1b-47f4-b2e9-30b477b5ab3d",
"imageUrl": "https://dev.azure.com/fabrikam/_api/_common/identityImage?id=8c8c7d32-6b1b-47f4-b2e9-30b477b5ab3d"
},
"checkedInBy": {
"id": "8c8c7d32-6b1b-47f4-b2e9-30b477b5ab3d",
"displayName": "Chuck Reinhart",
"uniqueName": "[email protected]",
"url": "https://vssps.dev.azure.com/fabrikam/_apis/Identities/8c8c7d32-6b1b-47f4-b2e9-30b477b5ab3d",
"imageUrl": "https://dev.azure.com/fabrikam/_api/_common/identityImage?id=8c8c7d32-6b1b-47f4-b2e9-30b477b5ab3d"
},
"createdDate": "2014-03-24T20:21:02.727Z",
"_links": {
"self": {
"href": "https://dev.azure.com/fabrikam/_apis/tfvc/changesets/16"
},
"changes": {
"href": "https://dev.azure.com/fabrikam/_apis/tfvc/changesets/16/changes"
},
"workItems": {
"href": "https://dev.azure.com/fabrikam/_apis/tfvc/changesets/16/workItems"
},
"author": {
"href": "https://vssps.dev.azure.com/fabrikam/_apis/Identities/8c8c7d32-6b1b-47f4-b2e9-30b477b5ab3d"
},
"checkedInBy": {
"href": "https://vssps.dev.azure.com/fabrikam/_apis/Identities/8c8c7d32-6b1b-47f4-b2e9-30b477b5ab3d"
}
}
}
Get a changeset with a max number of changes.
Sample request
GET https://dev.azure.com/fabrikam/_apis/tfvc/changesets/16?maxChangeCount=10&api-version=5.0
Sample response
{
"changes": [
{
"item": {
"version": 16,
"path": "$/Fabrikam-Fiber-TFVC/AuthSample-dev/Code/AuthSample.cs",
"url": "https://dev.azure.com/fabrikam/_apis/tfvc/items/%24/Fabrikam-Fiber-TFVC/AuthSample-dev/Code/AuthSample.cs?versionType=Changeset&version=16"
},
"changeType": "edit"
}
],
"changesetId": 16,
"url": "https://dev.azure.com/fabrikam/_apis/tfvc/changesets/16",
"author": {
"id": "8c8c7d32-6b1b-47f4-b2e9-30b477b5ab3d",
"displayName": "Chuck Reinhart",
"uniqueName": "[email protected]",
"url": "https://vssps.dev.azure.com/fabrikam/_apis/Identities/8c8c7d32-6b1b-47f4-b2e9-30b477b5ab3d",
"imageUrl": "https://dev.azure.com/fabrikam/_api/_common/identityImage?id=8c8c7d32-6b1b-47f4-b2e9-30b477b5ab3d"
},
"checkedInBy": {
"id": "8c8c7d32-6b1b-47f4-b2e9-30b477b5ab3d",
"displayName": "Chuck Reinhart",
"uniqueName": "[email protected]",
"url": "https://vssps.dev.azure.com/fabrikam/_apis/Identities/8c8c7d32-6b1b-47f4-b2e9-30b477b5ab3d",
"imageUrl": "https://dev.azure.com/fabrikam/_api/_common/identityImage?id=8c8c7d32-6b1b-47f4-b2e9-30b477b5ab3d"
},
"createdDate": "2014-03-24T20:21:02.727Z",
"_links": {
"self": {
"href": "https://dev.azure.com/fabrikam/_apis/tfvc/changesets/16"
},
"changes": {
"href": "https://dev.azure.com/fabrikam/_apis/tfvc/changesets/16/changes"
},
"workItems": {
"href": "https://dev.azure.com/fabrikam/_apis/tfvc/changesets/16/workItems"
},
"author": {
"href": "https://vssps.dev.azure.com/fabrikam/_apis/Identities/8c8c7d32-6b1b-47f4-b2e9-30b477b5ab3d"
},
"checkedInBy": {
"href": "https://vssps.dev.azure.com/fabrikam/_apis/Identities/8c8c7d32-6b1b-47f4-b2e9-30b477b5ab3d"
}
}
}
Get a changeset with policy details and check-in notes.
Sample request
GET https://dev.azure.com/fabrikam/_apis/tfvc/changesets/16?includeDetails=true&api-version=5.0
Sample response
{
"checkinNotes": [],
"policyOverride": {
"policyFailures": []
},
"changesetId": 16,
"url": "https://dev.azure.com/fabrikam/_apis/tfvc/changesets/16",
"author": {
"id": "8c8c7d32-6b1b-47f4-b2e9-30b477b5ab3d",
"displayName": "Chuck Reinhart",
"uniqueName": "[email protected]",
"url": "https://vssps.dev.azure.com/fabrikam/_apis/Identities/8c8c7d32-6b1b-47f4-b2e9-30b477b5ab3d",
"imageUrl": "https://dev.azure.com/fabrikam/_api/_common/identityImage?id=8c8c7d32-6b1b-47f4-b2e9-30b477b5ab3d"
},
"checkedInBy": {
"id": "8c8c7d32-6b1b-47f4-b2e9-30b477b5ab3d",
"displayName": "Chuck Reinhart",
"uniqueName": "[email protected]",
"url": "https://vssps.dev.azure.com/fabrikam/_apis/Identities/8c8c7d32-6b1b-47f4-b2e9-30b477b5ab3d",
"imageUrl": "https://dev.azure.com/fabrikam/_api/_common/identityImage?id=8c8c7d32-6b1b-47f4-b2e9-30b477b5ab3d"
},
"createdDate": "2014-03-24T20:21:02.727Z",
"_links": {
"self": {
"href": "https://dev.azure.com/fabrikam/_apis/tfvc/changesets/16"
},
"changes": {
"href": "https://dev.azure.com/fabrikam/_apis/tfvc/changesets/16/changes"
},
"workItems": {
"href": "https://dev.azure.com/fabrikam/_apis/tfvc/changesets/16/workItems"
},
"author": {
"href": "https://vssps.dev.azure.com/fabrikam/_apis/Identities/8c8c7d32-6b1b-47f4-b2e9-30b477b5ab3d"
},
"checkedInBy": {
"href": "https://vssps.dev.azure.com/fabrikam/_apis/Identities/8c8c7d32-6b1b-47f4-b2e9-30b477b5ab3d"
}
}
}
Get a changeset with workitems.
Sample request
GET https://dev.azure.com/fabrikam/_apis/tfvc/changesets/16?includeWorkItems=true&api-version=5.0
Sample response
{
"workItems": [],
"changesetId": 16,
"url": "https://dev.azure.com/fabrikam/_apis/tfvc/changesets/16",
"author": {
"id": "8c8c7d32-6b1b-47f4-b2e9-30b477b5ab3d",
"displayName": "Chuck Reinhart",
"uniqueName": "[email protected]",
"url": "https://vssps.dev.azure.com/fabrikam/_apis/Identities/8c8c7d32-6b1b-47f4-b2e9-30b477b5ab3d",
"imageUrl": "https://dev.azure.com/fabrikam/_api/_common/identityImage?id=8c8c7d32-6b1b-47f4-b2e9-30b477b5ab3d"
},
"checkedInBy": {
"id": "8c8c7d32-6b1b-47f4-b2e9-30b477b5ab3d",
"displayName": "Chuck Reinhart",
"uniqueName": "[email protected]",
"url": "https://vssps.dev.azure.com/fabrikam/_apis/Identities/8c8c7d32-6b1b-47f4-b2e9-30b477b5ab3d",
"imageUrl": "https://dev.azure.com/fabrikam/_api/_common/identityImage?id=8c8c7d32-6b1b-47f4-b2e9-30b477b5ab3d"
},
"createdDate": "2014-03-24T20:21:02.727Z",
"_links": {
"self": {
"href": "https://dev.azure.com/fabrikam/_apis/tfvc/changesets/16"
},
"changes": {
"href": "https://dev.azure.com/fabrikam/_apis/tfvc/changesets/16/changes"
},
"workItems": {
"href": "https://dev.azure.com/fabrikam/_apis/tfvc/changesets/16/workItems"
},
"author": {
"href": "https://vssps.dev.azure.com/fabrikam/_apis/Identities/8c8c7d32-6b1b-47f4-b2e9-30b477b5ab3d"
},
"checkedInBy": {
"href": "https://vssps.dev.azure.com/fabrikam/_apis/Identities/8c8c7d32-6b1b-47f4-b2e9-30b477b5ab3d"
}
}
}
Definitions
Name | Description |
---|---|
Associated |
|
Checkin |
|
Identity |
|
Item |
|
Item |
|
Reference |
The class to represent a collection of REST reference links. |
Tfvc |
A change. |
Tfvc |
A collection of changes. |
Tfvc |
MappingFilter can be used to include or exclude specific paths. |
Tfvc |
|
Tfvc |
Policy failure information. |
Tfvc |
Information on the policy override. |
Version |
The type of change that was made to the item. |
AssociatedWorkItem
Name | Type | Description |
---|---|---|
assignedTo |
string |
|
id |
integer (int32) |
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 |
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 |
|
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 |
|
isDeletedInOrigin |
boolean |
|
profileUrl |
string |
|
uniqueName |
string |
|
url |
string |
This url is the full route to the source resource of this graph subject. |
ItemContent
Name | Type | Description |
---|---|---|
content |
string |
|
contentType |
ItemContentType
Value | Description |
---|---|
base64Encoded | |
rawText |
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. |
TfvcChange
A change.
Name | Type | Description |
---|---|---|
changeType |
The type of change that was made to the item. |
|
item |
string (T) |
Current version. |
mergeSources |
List of merge sources in case of rename or branch creation. |
|
newContent |
Content of the item after the change. |
|
pendingVersion |
integer (int32) |
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. |
TfvcChangeset
A collection of changes.
Name | Type | Description |
---|---|---|
_links |
A collection of REST reference links. |
|
accountId |
string (uuid) |
Changeset Account Id also known as Organization Id. |
author |
Alias or display name of user. |
|
changes |
List of associated changes. |
|
changesetId |
integer (int32) |
Changeset Id. |
checkedInBy |
Alias or display name of user. |
|
checkinNotes |
List of Checkin Notes for the changeset. |
|
collectionId |
string (uuid) |
Changeset collection Id. |
comment |
string |
Comment for the changeset. |
commentTruncated |
boolean |
Was the Comment result truncated? |
createdDate |
string (date-time) |
Creation date of the changeset. |
hasMoreChanges |
boolean |
True if more changes are available. |
policyOverride |
Policy Override for the changeset. |
|
teamProjectIds |
string[] (uuid) |
Team Project Ids for the changeset. |
url |
string |
URL to retrieve the item. |
workItems |
List of work items associated with the changeset. |
TfvcMappingFilter
MappingFilter can be used to include or exclude specific paths.
Name | Type | Description |
---|---|---|
exclude |
boolean |
True if ServerPath should be excluded. |
serverPath |
string |
Path to be included or excluded. |
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 (int32) |
Start of the version range. |
versionTo |
integer (int32) |
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 |
Information on the failed policy that was overridden. |
VersionControlChangeType
The type of change that was made to the item.
Value | Description |
---|---|
add | |
all | |
branch | |
delete | |
edit | |
encoding | |
lock | |
merge | |
none | |
property | |
rename | |
rollback | |
sourceRename | |
targetRename | |
undelete |