TeamCity REST API Reference 2025.11 Help

VcsRootInstance

An instance of the VCS root. VCS roots are abstract storages of VCS connection settings that cannot be used directly. Build configurations, triggers, build features, and other TeamCity entities use instances of corresponding VCS roots to perform their tasks (checkout sources, post build statuses, and so on). If a root includes parameter references in its settings (for example, {'name':'branch','value':'%main-branch%'}), it spawns a separate instance for each configuration that has a unique value for that parameter. Otherwise, if all root settings are static, it generates one instance that can be attached to any number of build configurations.

Related Help article: VCS Settings

Properties

id

The internal read-only ID of this root instance.

vcs-root-id

The ID of a parent VcsRoot.

vcsRootInternalId

The internal ID of a parent VcsRoot

name

The public name of a parent VcsRoot.

vcsName

The type of a VCS provider to which the parent VcsRoot connects.

modificationCheckInterval

The actual interval (in seconds) for polling VCS for new changes.

commitHookMode

Returns true if the configuration uses post-commit hooks to get new repository changes' notifications; false if pending changes are retrieved via periodic repository polling.

lastVersion

The latest revision of a remote repository branch targeted by this root instance.

lastVersionInternal

This is the internal property and is not intented to be used.

href

The short (without TeamCity server address) link to this root instance.

vcs-root

The parent VCS root of this VCS root instance.

status

Stores results of both current and previous VCS root checkups.

repositoryState

A RepositoryState object that stores the list of available repository branches with their latest revisions.

properties

The list of actual VCS root instance settings, including values resolved from parameter references used in a parent VCS root.

repositoryIdStrings

The list of internally used repository IDs.

projectLocator

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.

<vcs-root-instance commitHookMode="false" href="/app/rest/vcs-root-instances/id:264" id="261" lastVersion="6feff116ab9ad0d3af686526a6ff96272620e70f" lastVersionInternal="6feff116ab9ad0d3af686526a6ff96272620e70f" modificationCheckInterval="60" name="customRootFromConfig" projectLocator="string" vcs-root-id="MyProject_CustomRootFromConfig" vcsName="jetbrains.git" vcsRootInternalId="599"> <vcs-root connectionId="my-github-connection-id" href="/app/rest/vcs-roots/id:Builders_MainGitRoot" id="Builders_MainGitRoot" internalId="599" locator="id:Builders_MainGitRoot" modificationCheckInterval="123" name="MainGitRoot" projectLocator="Obsolete" uuid="02308f8f-60f8-4b28-a964-7911ef0159eb" vcsName="jetbrains.git"> <project>[[[project...|project.html]]]</project> <properties>[[[properties...|properties.html]]]</properties> <vcsRootInstances>[[[vcs-root-instances...|vcsrootinstances.html]]]</vcsRootInstances> <repositoryIdStrings>[[[items...|items.html]]]</repositoryIdStrings> </vcs-root> <status> <current>[[[VcsCheckStatus...|vcscheckstatus.html]]]</current> <previous>[[[VcsCheckStatus...|vcscheckstatus.html]]]</previous> </status> <repositoryState count="9" timestamp="20250412T151928+0200"> <branch>[[[branchVersion...|branchversion.html]]]</branch> </repositoryState> <properties count="123" href="string"> <property>[[[property...|property.html]]]</property> </properties> <repositoryIdStrings item="string"/> </vcs-root-instance>
{ "lastVersion" : "6feff116ab9ad0d3af686526a6ff96272620e70f", "vcsRootInternalId" : "599", "commitHookMode" : false, "vcs-root" : { "vcsRootInstances" : "[[[vcs-root-instances...|vcsrootinstances.html]]]", "project" : "[[[project...|project.html]]]", "projectLocator" : "Obsolete", "uuid" : "02308f8f-60f8-4b28-a964-7911ef0159eb", "modificationCheckInterval" : 2, "internalId" : "599", "name" : "MainGitRoot", "vcsName" : "jetbrains.git", "connectionId" : "my-github-connection-id", "id" : "Builders_MainGitRoot", "href" : "/app/rest/vcs-roots/id:Builders_MainGitRoot", "locator" : "id:Builders_MainGitRoot", "properties" : "[[[properties...|properties.html]]]", "repositoryIdStrings" : "[[[items...|items.html]]]" }, "projectLocator" : "projectLocator", "modificationCheckInterval" : 60, "lastVersionInternal" : "6feff116ab9ad0d3af686526a6ff96272620e70f", "name" : "customRootFromConfig", "vcsName" : "jetbrains.git", "vcs-root-id" : "MyProject_CustomRootFromConfig", "id" : "261", "href" : "/app/rest/vcs-root-instances/id:264", "properties" : { "count" : 1, "property" : [ { "inherited" : true, "name" : "name", "type" : "[[[type...|type.html]]]", "value" : "value" } ], "href" : "href" }, "status" : { "current" : "[[[VcsCheckStatus...|vcscheckstatus.html]]]", "previous" : "[[[VcsCheckStatus...|vcscheckstatus.html]]]" }, "repositoryState" : { "count" : 9, "branch" : [ "[[[branchVersion...|branchversion.html]]]" ], "timestamp" : "20250412T151928+0200" }, "repositoryIdStrings" : { "item" : [ "item" ] } }
Last modified: 02 December 2025