TeamCity REST API Reference 2026.2 Help

RelatedEntity

A polymorphic entity reference that can represent any TeamCity entity (build, project, user, agent, and so on). Only one entity field is populated at a time, determined by the type attribute. Used in audit events and bulk operation results to identify the affected entity.

Properties

type

The entity type identifier, indicating which nested entity field is populated (for example, Build, Project, User).

unknown

Returns true if this entity could not be resolved (for example, the entity was deleted); otherwise, false.

internalId

Experimental. The internal (numeric) ID of this entity.

text

A plain-text description of this entity, populated when the entity type has no dedicated nested object.

build

The referenced build. Populated only when type is 'Build'.

buildType

The referenced build configuration. Populated only when type is 'BuildType'.

project

The referenced project. Populated only when type is 'Project'.

user

The referenced user. Populated only when type is 'User'.

group

The referenced user group. Populated only when type is 'Group'.

test

The referenced test. Populated only when type is 'Test'.

problem

The referenced build problem. Populated only when type is 'Problem'.

agent

The referenced build agent. Populated only when type is 'Agent'.

vcsRoot

The referenced VCS root. Populated only when type is 'VcsRoot'.

change

The referenced VCS change. Populated only when type is 'Change'.

agentPool

The referenced agent pool. Populated only when type is 'AgentPool'.

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.

<relatedEntity internalId="22011" text="Build #750 of GhAppMaven_Build" type="Build" unknown="false"> <build artifactsDirectory="/Users/John.Doe/.BuildServer/system/artifacts/ProjectName/ConfigName/1337" branchName="sandbox" buildTypeId="ProjectName_BuildConfName" buildTypeInternalId="string" chainModificationId="1916" changesCollectingInProgress="false" composite="false" currentSettingsHash="a3f5c2e1d8b74906" customized="true" defaultBranch="true" detachedFromAgent="false" failedToStart="true" finishDate="20240408T162702+0200" finishEstimate="20240409T160130+0200" finishOnAgentDate="20240408T162702+0200" history="true" href="/app/rest/builds/id:8006" id="8134" limitedChangesCount="3" locator="id:22011" modificationId="1916" number="54" parallelized="true" percentageComplete="123" personal="true" pinned="true" queuePosition="2" queuedDate="20240408T162059+0200" running="true" settingsHash="a3f5c2e1d8b74906" startDate="20240408T162559+0200" startEstimate="20240409T155123+0200" state="queued" status="SUCCESS" statusText="Tests passed: 5, muted: 1" taskId="22011" unspecifiedBranch="false" usedByOtherBuilds="true" waitReason="There are no idle compatible agents which can run this build" webUrl="https://example.com/app/rest/builds/id:8006"> <links>[[[links...|links.html]]]</links> <buildType>[[[buildType...|buildtype.html]]]</buildType> <comment>[[[comment...|comment.html]]]</comment> <tags>[[[tags...|tags.html]]]</tags> <pinInfo>[[[comment...|comment.html]]]</pinInfo> <user>[[[user...|user.html]]]</user> <delayedByBuild>[[[build...|build.html]]]</delayedByBuild> <plannedAgent>[[[agent...|agent.html]]]</plannedAgent> <approvalInfo>[[[approvalInfo...|approvalinfo.html]]]</approvalInfo> <running-info>[[[progress-info...|progressinfo.html]]]</running-info> <canceledInfo>[[[comment...|comment.html]]]</canceledInfo> <triggered>[[[TriggeredBy...|triggeredby.html]]]</triggered> <lastChanges>[[[changes...|changes.html]]]</lastChanges> <changes>[[[changes...|changes.html]]]</changes> <revisions>[[[Revisions...|revisions.html]]]</revisions> <versionedSettingsRevision>[[[Revision...|revision.html]]]</versionedSettingsRevision> <artifactDependencyChanges>[[[buildChanges...|buildchanges.html]]]</artifactDependencyChanges> <agent>[[[agent...|agent.html]]]</agent> <compatibleAgents>[[[agents...|agents.html]]]</compatibleAgents> <compatibleCloudImages>[[[cloudImages...|cloudimages.html]]]</compatibleCloudImages> <testOccurrences>[[[testOccurrences...|testoccurrences.html]]]</testOccurrences> <problemOccurrences>[[[problemOccurrences...|problemoccurrences.html]]]</problemOccurrences> <artifacts>[[[files...|files.html]]]</artifacts> <relatedIssues>[[[issuesUsages...|issuesusages.html]]]</relatedIssues> <properties>[[[properties...|properties.html]]]</properties> <resultingProperties>[[[properties...|properties.html]]]</resultingProperties> <originalProperties>[[[properties...|properties.html]]]</originalProperties> <startProperties>[[[properties...|properties.html]]]</startProperties> <attributes>[[[entries...|entries.html]]]</attributes> <statistics>[[[properties...|properties.html]]]</statistics> <metadata>[[[datas...|datas.html]]]</metadata> <snapshot-dependencies>[[[builds...|builds.html]]]</snapshot-dependencies> <artifact-dependencies>[[[builds...|builds.html]]]</artifact-dependencies> <custom-artifact-dependencies>[[[artifact-dependencies...|artifactdependencies.html]]]</custom-artifact-dependencies> <replacementIds>[[[items...|items.html]]]</replacementIds> <related>[[[related...|related.html]]]</related> <triggeringOptions>[[[buildTriggeringOptions...|buildtriggeringoptions.html]]]</triggeringOptions> <statusChangeComment>[[[comment...|comment.html]]]</statusChangeComment> <vcsLabels>[[[vcsLabel...|vcslabel.html]]]</vcsLabels> <customization>[[[customizations...|customizations.html]]]</customization> <queuedWaitReasons>[[[properties...|properties.html]]]</queuedWaitReasons> <downloadedArtifacts>[[[downloadedArtifacts...|downloadedartifacts.html]]]</downloadedArtifacts> <matrixConfiguration>[[[MatrixConfiguration...|matrixconfiguration.html]]]</matrixConfiguration> <firstBuildWithSameChanges>[[[build...|build.html]]]</firstBuildWithSameChanges> <executor>[[[BuildExecutor...|buildexecutor.html]]]</executor> <anchorBuild>[[[build...|build.html]]]</anchorBuild> </build> <buildType description="Deploys artifacts to the public registry" externalStatusAllowed="false" href="/app/rest/buildTypes/id:Deployments_DeployToGlobal" id="Deployments_DeployToGlobal" inherited="false" internalId="bt1057" locator="id:Deployments_DeployToGlobal" name="Deploy To Global" paused="false" projectId="Deployments" projectInternalId="project762" projectName="Deployments" templateFlag="false" type="regular" uuid="8e7eafb8-321b-456e-84db-e73714c8fa3f" webUrl="https://localhost:8111/buildConfiguration/Deployments_DeployToGlobal?mode=builds"> <links>[[[links...|links.html]]]</links> <project>[[[project...|project.html]]]</project> <templates>[[[buildTypes...|buildtypes.html]]]</templates> <template>[[[buildType...|buildtype.html]]]</template> <vcs-root-entries>[[[vcs-root-entries...|vcsrootentries.html]]]</vcs-root-entries> <settings>[[[properties...|properties.html]]]</settings> <parameters>[[[properties...|properties.html]]]</parameters> <output-parameters>[[[properties...|properties.html]]]</output-parameters> <steps>[[[steps...|steps.html]]]</steps> <features>[[[features...|features.html]]]</features> <triggers>[[[triggers...|triggers.html]]]</triggers> <snapshot-dependencies>[[[snapshot-dependencies...|snapshotdependencies.html]]]</snapshot-dependencies> <artifact-dependencies>[[[artifact-dependencies...|artifactdependencies.html]]]</artifact-dependencies> <agent-requirements>[[[agent-requirements...|agentrequirements.html]]]</agent-requirements> <branches>[[[branches...|branches.html]]]</branches> <builds>[[[builds...|builds.html]]]</builds> <investigations>[[[investigations...|investigations.html]]]</investigations> <compatibleAgents>[[[agents...|agents.html]]]</compatibleAgents> <compatibleCloudImages>[[[cloudImages...|cloudimages.html]]]</compatibleCloudImages> <vcsRootInstances>[[[vcs-root-instances...|vcsrootinstances.html]]]</vcsRootInstances> <pauseComment>[[[comment...|comment.html]]]</pauseComment> </buildType> <project archived="false" description="This subproject contains configurations that carry out delivery jobs" holdsPipeline="false" href="/app/rest/projects/id:BuildCacheNodeJS" id="BuildCacheNodeJS" internalId="project302" locator="id:MyProject" 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> <user email="johndoe@example.com" enabled2FA="false" hasPassword="true" href="/app/rest/users/id:11" id="1" lastLogin="20241001T155514+0200" locator="null" name="John Doe" password="foobar" realm="string" username="johndoe"> <properties>[[[properties...|properties.html]]]</properties> <roles>[[[roleAssignments...|roleassignments.html]]]</roles> <groups>[[[groups...|groups.html]]]</groups> <avatars>[[[userAvatars...|useravatars.html]]]</avatars> </user> <group description="Contains all TeamCity users" href="/app/rest/userGroups/key:ALL_USERS_GROUP" key="ALL_USERS_GROUP" name="All Users"> <parent-groups>[[[groups...|groups.html]]]</parent-groups> <child-groups>[[[groups...|groups.html]]]</child-groups> <users>[[[users...|users.html]]]</users> <roles>[[[roleAssignments...|roleassignments.html]]]</roles> <properties>[[[properties...|properties.html]]]</properties> </group> <test href="/app/rest/tests/id:123456789" id="123456789" locator="id:123456789" name="com.mycompany.app.AppTest.testAppMessage"> <mutes>[[[mutes...|mutes.html]]]</mutes> <investigations>[[[investigations...|investigations.html]]]</investigations> <testOccurrences>[[[testOccurrences...|testoccurrences.html]]]</testOccurrences> <parsedTestName>[[[ParsedTestName...|parsedtestname.html]]]</parsedTestName> </test> <problem description="string" href="/app/rest/problems/id:211" id="211" identity="simpleRunnerfail_build_127" locator="id:211" type="TC_EXIT_CODE"> <mutes>[[[mutes...|mutes.html]]]</mutes> <investigations>[[[investigations...|investigations.html]]]</investigations> <problemOccurrences>[[[problemOccurrences...|problemoccurrences.html]]]</problemOccurrences> </problem> <agent authorized="true" connected="true" cpuRank="396" currentAgentVersion="160569" disconnectionComment="Unregistered because of inactivity" enabled="true" host="ip-52-211-39-10.eu-west-1.compute.internal, localhost" href="/app/rest/agents/id:771" id="771" idleSinceTime="20240816T150655+0200" ip="52.211.39.100" javaOutdated="false" lastActivityTime="20240816T151123+0200" locator="id:771" name="Ubuntu-22.04-Large-i-045902939eae4af1a" outdated="true" pluginsOutdated="false" port="9090" protocol="string" registrationTimestamp="20240816T150655+0200" removed="false" typeId="661" upgrading="false" uptodate="false" version="156364" webUrl="https://example.com/agentDetails.html?id=771&amp;agentTypeId=11389&amp;realAgentName=db-win-2003"> <build>[[[build...|build.html]]]</build> <links>[[[links...|links.html]]]</links> <enabledInfo>[[[enabledInfo...|enabledinfo.html]]]</enabledInfo> <authorizedInfo>[[[authorizedInfo...|authorizedinfo.html]]]</authorizedInfo> <properties>[[[properties...|properties.html]]]</properties> <cloudInstance>[[[cloudInstance...|cloudinstance.html]]]</cloudInstance> <cloudImage>[[[cloudImage...|cloudimage.html]]]</cloudImage> <environment>[[[environment...|environment.html]]]</environment> <pool>[[[agentPool...|agentpool.html]]]</pool> <compatibilityPolicy>[[[compatibilityPolicy...|compatibilitypolicy.html]]]</compatibilityPolicy> <compatibleBuildTypes>[[[buildTypes...|buildtypes.html]]]</compatibleBuildTypes> <incompatibleBuildTypes>[[[compatibilities...|compatibilities.html]]]</incompatibleBuildTypes> <builds>[[[builds...|builds.html]]]</builds> </agent> <vcsRoot 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> </vcsRoot> <change canEditComment="true" comment="Update README.md" commitDate="20240905T151159+0200" date="20240905T151059+0200" href="/app/rest/changes/id:704,personal:true" id="1190" internalVersion="c1046c4fa016a774253fb3b93e6cc8bd12c159e5" locator="null" personal="true" registrationDate="20240905T151115+0200" storesProjectSettings="false" type="VCS_CHANGE" username="string" version="c1046c4fa016a774253fb3b93e6cc8bd12c159e5, 05 09 2024 17:23" webUrl="https://localhost:8111/change/1417?personal=false"> <user>[[[user...|user.html]]]</user> <snapshotDependencyLink>[[[SnapshotDependencyLink...|snapshotdependencylink.html]]]</snapshotDependencyLink> <files>[[[fileChanges...|filechanges.html]]]</files> <vcsRootInstance>[[[vcs-root-instance...|vcsrootinstance.html]]]</vcsRootInstance> <parentChanges>[[[changes...|changes.html]]]</parentChanges> <parentRevisions>[[[items...|items.html]]]</parentRevisions> <attributes>[[[properties...|properties.html]]]</attributes> <status>[[[ChangeStatus...|changestatus.html]]]</status> <commiter>[[[commiter...|commiter.html]]]</commiter> </change> <agentPool href="/app/rest/agentPools/id:82" id="31" locator="id:31" maxAgents="10" name="Kubernetes"> <ownerProject>[[[project...|project.html]]]</ownerProject> <projects>[[[projects...|projects.html]]]</projects> <agents>[[[agents...|agents.html]]]</agents> <agentTypes>[[[agentTypes...|agenttypes.html]]]</agentTypes> </agentPool> </relatedEntity>
{ "agent" : "[[[agent...|agent.html]]]", "vcsRoot" : "[[[vcs-root...|vcsroot.html]]]", "test" : "[[[test...|test.html]]]", "change" : "[[[change...|change.html]]]", "project" : "[[[project...|project.html]]]", "type" : "Build", "unknown" : false, "internalId" : "22011", "problem" : "[[[problem...|problem.html]]]", "build" : "[[[build...|build.html]]]", "buildType" : "[[[buildType...|buildtype.html]]]", "text" : "Build #750 of GhAppMaven_Build", "agentPool" : "[[[agentPool...|agentpool.html]]]", "user" : "[[[user...|user.html]]]", "group" : "[[[group...|group.html]]]" }
Last modified: 18 August 2026