Change
Represents a VCS change (commit).
Related Help article: Change
tip
Data type:
long
Example:1190
The unique ID of this change object.
tip
Data type:
string
Example:c1046c4fa016a774253fb3b93e6cc8bd12c159e5, 05 09 2024 17:23
The full revision SHA that corresponds to this change, or a time stamp of a personal build that processed a custom diff
tip
Data type:
string
Example:c1046c4fa016a774253fb3b93e6cc8bd12c159e5
tip
Data type:
string
Example:
This property is obsolete. To identify the change author, read the commiter
property instead.
tip
Data type:
string
Example:20240905T151059+0200
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.
tip
Data type:
string
Example:20240905T151115+0200
Returns the timestamp that corresponds to the moment this change was registered in the TeamCity database.
tip
Data type:
boolean
Example:
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.
tip
Data type:
string
Example:/app/rest/changes/id:704,personal:true
Returns the shortened (without the server URL) link to the current change.
tip
Data type:
string
Example:
tip
Data type:
string
Example:
tip
Data type:
User
Example:
This property is obsolete. To identify the change author, read the commiter
property instead.
tip
Data type:
string
Example:VCS_CHANGE
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.
tip
Data type:
SnapshotDependencyLink
Example:
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.
tip
Data type:
FileChanges
Example:
The list of files modified by this change.
tip
Data type:
VcsRootInstance
Example:
Gets a VCS root instance responsible for delivering this change. Returns null for personal changes.
tip
Data type:
Changes
Example:
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.
tip
Data type:
Items
Example:
Revision SHAs of changes from the parentChanges
list.
tip
Data type:
Properties
Example:
The list of parameters introduced in these changes.
tip
Data type:
boolean
Example:
tip
Data type:
ChangeStatus
Example:
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.
tip
Data type:
Commiter
Example:
Returns the object that contains information about the change author. Inludes both VCS and TeamCity user data.
tip
Data type:
boolean
Example:
tip
Data type:
string
Example:
This property supports the internal infrastructure and is not intended to be used in your code.
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>
<roles>roles...</roles>
<groups>groups...</groups>
<avatars>userAvatars...</avatars>
</user>
<snapshotDependencyLink buildTypeBranch="string">
<build>build...</build>
<buildType>buildType...</buildType>
</snapshotDependencyLink>
<files count="123">
<file>FileChange...</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...</vcs-root>
<status>vcsStatus...</status>
<repositoryState>repositoryState...</repositoryState>
<properties>properties...</properties>
<repositoryIdStrings>items...</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>
</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...</compilationErrorBuilds>
<criticalBuilds>builds...</criticalBuilds>
<notCriticalBuilds>builds...</notCriticalBuilds>
<newTestsFailedBuilds>builds...</newTestsFailedBuilds>
</status>
<commiter vcsUsername="string">
<users>users...</users>
</commiter>
</change>
{
"date" : "20240905T151059+0200",
"vcsRootInstance" : "vcs-root-instance...",
"canEditComment" : true,
"personal" : true,
"storesProjectSettings" : true,
"type" : "VCS_CHANGE",
"version" : "c1046c4fa016a774253fb3b93e6cc8bd12c159e5, 05 09 2024 17:23",
"snapshotDependencyLink" : "SnapshotDependencyLink...",
"webUrl" : "webUrl",
"registrationDate" : "20240905T151115+0200",
"files" : "fileChanges...",
"parentRevisions" : "items...",
"internalVersion" : "c1046c4fa016a774253fb3b93e6cc8bd12c159e5",
"comment" : "comment",
"attributes" : "properties...",
"id" : 1190,
"href" : "/app/rest/changes/id:704,personal:true",
"user" : "user...",
"commiter" : "commiter...",
"locator" : "null",
"parentChanges" : "changes...",
"username" : "username",
"status" : "ChangeStatus..."
}
Thanks for your feedback!