TeamCity REST API Reference 2025.11 Help

VcsRoot

A VCS root stores repository connection settings. TeamCity uses VCS roots to create VcsRootInstance objects, enabling build configurations and features to interact with remote repositories for source checkout, build status publishing, and more.

Related Help article: Configuring VCS Roots

Properties

id

The unique ID of the root. Typically consists of trunkated parent project ID and root name.

internalId

The internal read-only ID of the root.

uuid

The internal read-only UUID of the root.

name

The public root name displayed in TeamCity UI.

vcsName

The type of a VCS provider to which this root connects.

modificationCheckInterval

The interval (in seconds) for polling VCS for new changes. Equals null if this root uses default server polling interval.

href

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

project

The TeamCity project that owns this VCS root.

properties

The list of VCS root settings, such as clean policy, auth method, default repository branch name, and more.

vcsRootInstances

The list of VcsRootInstance objects spawned from this VCS root. If all root settings are static, it produces one root instance that can be attached to one or multiple configurations. In turn, if some of the root settings use parameter references (for example, {'name':'branch','value':'%main-branch%'}), a different VcsRootInstance is spawned for each build configuration that has a unique main-branch property value. In this case a single VcsRoot has multiple corresponding VcsRootInstances.

repositoryIdStrings

The list of internally used repository IDs.

locator

The part of the href property value that specifies the object locator. Ommitted from regular responses.

projectLocator

This property is deprecated.

connectionId

Optional ID of a project connection to use for authentication when creating a new VCS root. Used only for POST; not returned.

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 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 archived="false" description="This subproject contains configurations that carry out delivery jobs" href="/app/rest/projects/id:BuildCacheNodeJS" id="BuildCacheNodeJS" internalId="project302" locator="string" name="Build Cache — NodeJS" parentProjectId="S3BucketsTest" parentProjectInternalId="project82" parentProjectName="S3 Buckets Test" uuid="37dccab8-ddf9-4f81-a1ad-7815f0e841e1" virtual="false" webUrl="https://localhost:8111/project.html?projectId=BuildAndDeploy"> <links>[[[links...|links.html]]]</links> <parentProject>[[[project...|project.html]]]</parentProject> <readOnlyUI>[[[StateField...|statefield.html]]]</readOnlyUI> <defaultTemplate>[[[buildType...|buildtype.html]]]</defaultTemplate> <buildTypes>[[[buildTypes...|buildtypes.html]]]</buildTypes> <templates>[[[buildTypes...|buildtypes.html]]]</templates> <deploymentDashboards>[[[deploymentDashboards...|deploymentdashboards.html]]]</deploymentDashboards> <parameters>[[[properties...|properties.html]]]</parameters> <vcsRoots>[[[vcs-roots...|vcsroots.html]]]</vcsRoots> <projectFeatures>[[[projectFeatures...|projectfeatures.html]]]</projectFeatures> <projects>[[[projects...|projects.html]]]</projects> <cloudProfiles>[[[cloudProfiles...|cloudprofiles.html]]]</cloudProfiles> <ancestorProjects>[[[projects...|projects.html]]]</ancestorProjects> </project> <properties count="123" href="string"> <property>[[[property...|property.html]]]</property> </properties> <vcsRootInstances count="10" href="/app/rest/vcs-root-instances?locator=count:10,start:20" nextHref="/app/rest/vcs-root-instances?locator=count:10,start:30" prevHref="/app/rest/vcs-root-instances?locator=count:10,start:10"> <vcs-root-instance>[[[vcs-root-instance...|vcsrootinstance.html]]]</vcs-root-instance> </vcsRootInstances> <repositoryIdStrings item="string"/> </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]]]" }
Last modified: 02 December 2025