TeamCity REST API Reference 2024.07 Help

Change

Represents a VCS change (commit).

Related Help article: Change

Properties

id

The unique ID of this change object.

version

The full revision SHA that corresponds to this change, or a time stamp of a personal build that processed a custom diff

internalVersion

username

This property is obsolete. To identify the change author, read the commiter property instead.

date

Returns the timestamp that corresponds to the moment this change was pushed to the VCS. If this is a custom change uploaded to a personal build, returns the timestamp of this build instead.

registrationDate

Returns the timestamp that corresponds to the moment this change was registered in the TeamCity database.

personal

Returns true if this change was a custom patch uploaded to a personal build. If this is a regular change that comes from a VCS (even if the build that processed it is a personal one), returns false.

href

Returns the shortened (without the server URL) link to the current change.

webUrl

comment

user

This property is obsolete. To identify the change author, read the commiter property instead.

type

Specifies the origin of the change.

  • VCS_CHANGE — the regular change that originates from a repository related to the target build.

  • SNAPSHOT_DEPENDENCY_VCS_CHANGE — the change is processed in another build on which the target build depends (via the snapshot dependency). Add the changesFromDependencies:true locator to your request if you want the response to include changes processed in upstream chain builds.

If a change has the SNAPSHOT_DEPENDENCY_VCS_CHANGE type, it was processed in an upstream build of a build chain. The snapshotDependencyLink property points to this upstream build that processed this change.

files

The list of files modified by this change.

vcsRootInstance

Gets a VCS root instance responsible for delivering this change. Returns null for personal changes.

parentChanges

Returns the list of preceding changes. Normally includes one commit that was introduced directly before the current change, or two latest changes from each of the merged branches.

parentRevisions

Revision SHAs of changes from the parentChanges list.

attributes

The list of parameters introduced in these changes.

storesProjectSettings

status

Returns an object that stores information about this change in terms of effects it had on the TeamCity server: the number of failed/cancelled/successful builds, the number of build configurations that have this change in the pending changes list, the number of build problems and failed tests caused by this change, and so on.

commiter

Returns the object that contains information about the change author. Inludes both VCS and TeamCity user data.

canEditComment

locator

This property supports the internal infrastructure and is not intended to be used in your code.

Schema

Below, you can find a full schema of this object, in XML and JSON formats. You can choose what fields to submit depending on your current needs. Different methods might expect different fields: the best approach is to request this entity via GET and use the response as a base for the following POST request.

A link to another object implies that you can substitute it with the schema of the linked object, if it is required for your call.

<change canEditComment="true" comment="string" date="20240905T151059+0200" href="/app/rest/changes/id:704,personal:true" id="1190" internalVersion="c1046c4fa016a774253fb3b93e6cc8bd12c159e5" locator="null" personal="true" registrationDate="20240905T151115+0200" storesProjectSettings="true" type="VCS_CHANGE" username="string" version="c1046c4fa016a774253fb3b93e6cc8bd12c159e5, 05 09 2024 17:23" webUrl="string"> <user email="string" enabled2FA="true" hasPassword="true" href="string" id="123456789" lastLogin="string" locator="string" name="string" password="string" realm="string" username="string"> <properties>[[[properties...|properties.html]]]</properties> <roles>[[[roles...|roles.html]]]</roles> <groups>[[[groups...|groups.html]]]</groups> <avatars>[[[userAvatars...|useravatars.html]]]</avatars> </user> <snapshotDependencyLink buildTypeBranch="string"> <build>[[[build...|build.html]]]</build> <buildType>[[[buildType...|buildtype.html]]]</buildType> </snapshotDependencyLink> <files count="123"> <file>[[[FileChange...|filechange.html]]]</file> </files> <vcsRootInstance commitHookMode="true" href="string" id="string" lastVersion="string" lastVersionInternal="string" modificationCheckInterval="123" name="string" projectLocator="string" vcs-root-id="string" vcsName="string" vcsRootInternalId="string"> <vcs-root>[[[vcs-root...|vcsroot.html]]]</vcs-root> <status>[[[vcsStatus...|vcsstatus.html]]]</status> <repositoryState>[[[repositoryState...|repositorystate.html]]]</repositoryState> <properties>[[[properties...|properties.html]]]</properties> <repositoryIdStrings>[[[items...|items.html]]]</repositoryIdStrings> </vcsRootInstance> <parentChanges count="123" href="string" nextHref="string" prevHref="string"> <change>[[[change...|]]]</change> </parentChanges> <parentRevisions item="string"/> <attributes count="123" href="string"> <property>[[[property...|property.html]]]</property> </attributes> <status cancelledBuilds="123" failedBuilds="123" finishedBuilds="123" newFailedTests="123" otherFailedTests="123" pendingBuildTypes="123" queuedBuildsCount="123" runningBuilds="123" runningSuccessfullyBuilds="123" successfulBuilds="123" totalProblems="123"> <compilationErrorBuilds>[[[builds...|builds.html]]]</compilationErrorBuilds> <criticalBuilds>[[[builds...|builds.html]]]</criticalBuilds> <notCriticalBuilds>[[[builds...|builds.html]]]</notCriticalBuilds> <newTestsFailedBuilds>[[[builds...|builds.html]]]</newTestsFailedBuilds> </status> <commiter vcsUsername="string"> <users>[[[users...|users.html]]]</users> </commiter> </change>
{ "date" : "20240905T151059+0200", "vcsRootInstance" : "[[[vcs-root-instance...|vcsrootinstance.html]]]", "canEditComment" : true, "personal" : true, "storesProjectSettings" : true, "type" : "VCS_CHANGE", "version" : "c1046c4fa016a774253fb3b93e6cc8bd12c159e5, 05 09 2024 17:23", "snapshotDependencyLink" : "[[[SnapshotDependencyLink...|snapshotdependencylink.html]]]", "webUrl" : "webUrl", "registrationDate" : "20240905T151115+0200", "files" : "[[[fileChanges...|filechanges.html]]]", "parentRevisions" : "[[[items...|items.html]]]", "internalVersion" : "c1046c4fa016a774253fb3b93e6cc8bd12c159e5", "comment" : "comment", "attributes" : "[[[properties...|properties.html]]]", "id" : 1190, "href" : "/app/rest/changes/id:704,personal:true", "user" : "[[[user...|user.html]]]", "commiter" : "[[[commiter...|commiter.html]]]", "locator" : "null", "parentChanges" : "[[[changes...|changes.html]]]", "username" : "username", "status" : "[[[ChangeStatus...|changestatus.html]]]" }
Last modified: 23 September 2024