Changesets - Get

Retrieve a Tfvc Changeset

GET https://dev.azure.com/{organization}/{project}/_apis/tfvc/changesets/{id}?api-version=7.1-preview.3
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.author={searchCriteria.author}&searchCriteria.followRenames={searchCriteria.followRenames}&searchCriteria.fromDate={searchCriteria.fromDate}&searchCriteria.fromId={searchCriteria.fromId}&searchCriteria.includeLinks={searchCriteria.includeLinks}&searchCriteria.itemPath={searchCriteria.itemPath}&searchCriteria.toDate={searchCriteria.toDate}&searchCriteria.toId={searchCriteria.toId}&api-version=7.1-preview.3

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 '7.1-preview.3' 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

includeDetails
query

boolean

Include policy details and check-in notes in the response. Default: false

includeSourceRename
query

boolean

Include renames. Default: false

includeWorkItems
query

boolean

Include workitems. Default: false

maxChangeCount
query

integer

int32

Number of changes to return (maximum 100 changes) Default: 0

maxCommentLength
query

integer

int32

Include details about associated work items in the response. Default: null

searchCriteria.author
query

string

Alias or display name of user who made the changes.

searchCriteria.followRenames
query

boolean

Whether or not to follow renames for the given item being queried.

searchCriteria.fromDate
query

string

If provided, only include changesets created after this date (string).

searchCriteria.fromId
query

integer

int32

If provided, only include changesets after this changesetID.

searchCriteria.includeLinks
query

boolean

Whether to include the _links field on the shallow references.

searchCriteria.itemPath
query

string

Path of item to search under.

searchCriteria.toDate
query

string

If provided, only include changesets created before this date (string).

searchCriteria.toId
query

integer

int32

If provided, a version descriptor for the latest change list to include.

Request Body

Name Type Description
searchCriteria.mappings

TfvcMappingFilter[]

Following criteria available (.itemPath, .version, .versionType, .versionOption, .author, .fromId, .toId, .fromDate, .toDate) Default: null

Responses

Name Type Description
200 OK

TfvcChangeset

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=7.1-preview.3

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": "fabrikamfiber3@hotmail.com",
    "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": "fabrikamfiber3@hotmail.com",
    "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=7.1-preview.3

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": "fabrikamfiber3@hotmail.com",
    "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": "fabrikamfiber3@hotmail.com",
    "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=7.1-preview.3

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": "fabrikamfiber3@hotmail.com",
    "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": "fabrikamfiber3@hotmail.com",
    "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=7.1-preview.3

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": "fabrikamfiber3@hotmail.com",
    "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": "fabrikamfiber3@hotmail.com",
    "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
AssociatedWorkItem
CheckinNote
IdentityRef
ItemContent
ItemContentType
ReferenceLinks

The class to represent a collection of REST reference links.

TfvcChange

A change.

TfvcChangeset

A collection of changes.

TfvcMappingFilter

MappingFilter can be used to include or exclude specific paths.

TfvcMergeSource
TfvcPolicyFailureInfo

Policy failure information.

TfvcPolicyOverrideInfo

Information on the policy override.

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.

TfvcChangeset

A collection of changes.

Name Type Description
_links

ReferenceLinks

A collection of REST reference links.

accountId

string

Changeset Account Id also known as Organization Id.

author

IdentityRef

Alias or display name of user.

changes

TfvcChange[]

List of associated changes.

changesetId

integer

Changeset Id.

checkedInBy

IdentityRef

Alias or display name of user.

checkinNotes

CheckinNote[]

List of Checkin Notes for the changeset.

collectionId

string

Changeset collection Id.

comment

string

Comment for the changeset.

commentTruncated

boolean

Was the Comment result truncated?

createdDate

string

Creation date of the changeset.

hasMoreChanges

boolean

True if more changes are available.

policyOverride

TfvcPolicyOverrideInfo

Policy Override for the changeset.

teamProjectIds

string[]

Team Project Ids for the changeset.

url

string

URL to retrieve the item.

workItems

AssociatedWorkItem[]

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

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.

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