TriggeredBy
Identifies the authority that triggered this build.
tip
Data type:
string
Example:user
Returns the following values depending on the authority that triggered this build:
user if the build was triggered manually in TeamCity UI or via REST API.
snapshotDependency if the build is a part of a build chain and was requested by a downstream build configuration.
vcs if the build was initiated by the VCS Trigger that found new commits in the remote repository.
schedule if the build was initiated by the Schedule Trigger.
finishBuild if the build was initiated by the Finish Build Trigger.
retry if the build was initiated by the Retry Trigger that re-starts failed builds.
tip
Data type:
string
Example:
Optional details regarding the triggering event.
tip
Data type:
string
Example:20240515T132432+0200
The timestamp of the build triggering.
tip
Data type:
string
Example:Snapshot dependency; Finish Build Trigger; Pet Clinic / Update Packages, build #27
The summary displayed next to the 'Triggered' line in TeamCity UI. Enumerates authorities that caused this build to run and displays the build's parent configuration name and number.
tip
Data type:
string
Example:##buildTypeId='bt403' origin='rest' buildId='9543' type='snapshotDependency' userId='1'
The string representation of the properties
array.
tip
Data type:
User
Example:
Identifies the user who initiated a build, directly or indirectly. Indirectly means they initiated another build that eventuated the current one (for example, started a dependent build or triggered a build that failed and was then restarted by the Retry Trigger). Builds initiated by the Schedule Trigger do not have a related user.
tip
Data type:
Build
Example:
A separate build that caused this one to run. Can co-exist with the user
field: for example, if a user triggered build A that requested (via a snapshot dependency) build B, the latter will have links to both the build A and the user who initiated it.
tip
Data type:
BuildType
Example:
The parent build configuration of the build
.
tip
Data type:
Properties
Example:
The array of name-value pairs containing service information about the triggered build and the events that initiated it.
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.
<TriggeredBy date="20240515T132432+0200" details="string" displayText="Snapshot dependency; Finish Build Trigger; Pet Clinic / Update Packages, build #27" rawValue="##buildTypeId='bt403' origin='rest' buildId='9543' type='snapshotDependency' userId='1'" type="user">
<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>
<build artifactsDirectory="/Users/John.Doe/.BuildServer/system/artifacts/ProjectName/ConfigName/1337" branchName="sandbox" buildTypeId="ProjectName_BuildConfName" buildTypeInternalId="string" chainModificationId="string" changesCollectingInProgress="false" composite="false" currentSettingsHash="string" 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="string" modificationId="string" number="54" percentageComplete="123" personal="true" pinned="true" queuePosition="2" queuedDate="20240408T162059+0200" running="true" settingsHash="string" startDate="20240408T162559+0200" startEstimate="20240409T155123+0200" state="queued" status="SUCCESS" statusText="Tests passed: 5, muted: 1" taskId="123456789" 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>
<buildType>buildType...</buildType>
<comment>comment...</comment>
<tags>tags...</tags>
<pinInfo>comment...</pinInfo>
<user>user...</user>
<delayedByBuild>build...</delayedByBuild>
<plannedAgent>agent...</plannedAgent>
<approvalInfo>approvalInfo...</approvalInfo>
<running-info>progress-info...</running-info>
<canceledInfo>comment...</canceledInfo>
<triggered>TriggeredBy...</triggered>
<lastChanges>changes...</lastChanges>
<changes>changes...</changes>
<revisions>Revisions...</revisions>
<versionedSettingsRevision>Revision...</versionedSettingsRevision>
<artifactDependencyChanges>buildChanges...</artifactDependencyChanges>
<agent>agent...</agent>
<compatibleAgents>agents...</compatibleAgents>
<compatibleCloudImages>cloudImages...</compatibleCloudImages>
<testOccurrences>testOccurrences...</testOccurrences>
<problemOccurrences>problemOccurrences...</problemOccurrences>
<artifacts>files...</artifacts>
<relatedIssues>issuesUsages...</relatedIssues>
<properties>properties...</properties>
<resultingProperties>properties...</resultingProperties>
<originalProperties>properties...</originalProperties>
<startProperties>properties...</startProperties>
<attributes>entries...</attributes>
<statistics>properties...</statistics>
<metadata>datas...</metadata>
<snapshot-dependencies>builds...</snapshot-dependencies>
<artifact-dependencies>builds...</artifact-dependencies>
<custom-artifact-dependencies>artifact-dependencies...</custom-artifact-dependencies>
<replacementIds>items...</replacementIds>
<related>related...</related>
<triggeringOptions>buildTriggeringOptions...</triggeringOptions>
<statusChangeComment>comment...</statusChangeComment>
<vcsLabels>vcsLabel...</vcsLabels>
<customization>customizations...</customization>
<queuedWaitReasons>properties...</queuedWaitReasons>
<downloadedArtifacts>downloadedArtifacts...</downloadedArtifacts>
<matrixConfiguration>MatrixConfiguration...</matrixConfiguration>
<firstBuildWithSameChanges>build...</firstBuildWithSameChanges>
</build>
<buildType description="string" externalStatusAllowed="true" href="string" id="string" inherited="true" internalId="string" locator="string" name="string" paused="true" projectId="string" projectInternalId="string" projectName="string" templateFlag="true" type="string" uuid="string" webUrl="string">
<links>links...</links>
<project>project...</project>
<templates>buildTypes...</templates>
<template>buildType...</template>
<vcs-root-entries>vcs-root-entries...</vcs-root-entries>
<settings>properties...</settings>
<parameters>properties...</parameters>
<steps>steps...</steps>
<features>features...</features>
<triggers>triggers...</triggers>
<snapshot-dependencies>snapshot-dependencies...</snapshot-dependencies>
<artifact-dependencies>artifact-dependencies...</artifact-dependencies>
<agent-requirements>agent-requirements...</agent-requirements>
<branches>branches...</branches>
<builds>builds...</builds>
<investigations>investigations...</investigations>
<compatibleAgents>agents...</compatibleAgents>
<compatibleCloudImages>cloudImages...</compatibleCloudImages>
<vcsRootInstances>vcs-root-instances...</vcsRootInstances>
<pauseComment>comment...</pauseComment>
</buildType>
<properties count="123" href="string">
<property>property...</property>
</properties>
</TriggeredBy>
{
"date" : "20240515T132432+0200",
"displayText" : "Snapshot dependency; Finish Build Trigger; Pet Clinic / Update Packages, build #27",
"rawValue" : "##buildTypeId='bt403' origin='rest' buildId='9543' type='snapshotDependency' userId='1'",
"build" : {
"agent" : "agent...",
"metadata" : "datas...",
"triggered" : "TriggeredBy...",
"usedByOtherBuilds" : true,
"settingsHash" : "settingsHash",
"number" : "54",
"chainModificationId" : "chainModificationId",
"changesCollectingInProgress" : false,
"lastChanges" : "changes...",
"resultingProperties" : "properties...",
"composite" : false,
"links" : "links...",
"id" : 8134,
"state" : "queued",
"href" : "/app/rest/builds/id:8006",
"detachedFromAgent" : false,
"compatibleCloudImages" : "cloudImages...",
"artifacts" : "files...",
"testOccurrences" : "testOccurrences...",
"artifactDependencyChanges" : "buildChanges...",
"startProperties" : "properties...",
"defaultBranch" : true,
"compatibleAgents" : "agents...",
"artifact-dependencies" : "builds...",
"replacementIds" : "items...",
"personal" : true,
"history" : true,
"tags" : "tags...",
"canceledInfo" : "comment...",
"matrixConfiguration" : "MatrixConfiguration...",
"running-info" : "progress-info...",
"versionedSettingsRevision" : "Revision...",
"percentageComplete" : 6,
"webUrl" : "https://example.com/app/rest/builds/id:8006",
"buildType" : "buildType...",
"triggeringOptions" : "buildTriggeringOptions...",
"locator" : "locator",
"startDate" : "20240408T162559+0200",
"status" : "SUCCESS",
"pinned" : true,
"customized" : true,
"approvalInfo" : "approvalInfo...",
"vcsLabels" : [ "vcsLabel..." ],
"customization" : "customizations...",
"finishEstimate" : "20240409T160130+0200",
"changes" : "changes...",
"plannedAgent" : "agent...",
"running" : true,
"statusChangeComment" : "comment...",
"finishOnAgentDate" : "20240408T162702+0200",
"buildTypeId" : "ProjectName_BuildConfName",
"buildTypeInternalId" : "buildTypeInternalId",
"originalProperties" : "properties...",
"modificationId" : "modificationId",
"related" : "related...",
"failedToStart" : true,
"revisions" : "Revisions...",
"delayedByBuild" : "build...",
"queuePosition" : 2,
"problemOccurrences" : "problemOccurrences...",
"artifactsDirectory" : "/Users/John.Doe/.BuildServer/system/artifacts/ProjectName/ConfigName/1337",
"relatedIssues" : "issuesUsages...",
"branchName" : "sandbox",
"startEstimate" : "20240409T155123+0200",
"downloadedArtifacts" : "downloadedArtifacts...",
"limitedChangesCount" : 3,
"firstBuildWithSameChanges" : "build...",
"currentSettingsHash" : "currentSettingsHash",
"unspecifiedBranch" : false,
"queuedWaitReasons" : "properties...",
"waitReason" : "There are no idle compatible agents which can run this build",
"pinInfo" : "comment...",
"snapshot-dependencies" : "builds...",
"statusText" : "Tests passed: 5, muted: 1",
"custom-artifact-dependencies" : "artifact-dependencies...",
"comment" : "comment...",
"finishDate" : "20240408T162702+0200",
"attributes" : "entries...",
"user" : "user...",
"queuedDate" : "20240408T162059+0200",
"taskId" : 9,
"properties" : "properties...",
"statistics" : "properties..."
},
"buildType" : {
"template" : "buildType...",
"paused" : true,
"description" : "description",
"project" : "project...",
"investigations" : "investigations...",
"templateFlag" : true,
"type" : "regular",
"uuid" : "uuid",
"projectInternalId" : "projectInternalId",
"internalId" : "internalId",
"features" : "features...",
"builds" : "builds...",
"links" : "links...",
"id" : "id",
"href" : "href",
"compatibleCloudImages" : "cloudImages...",
"settings" : "properties...",
"vcsRootInstances" : "vcs-root-instances...",
"templates" : "buildTypes...",
"artifact-dependencies" : "artifact-dependencies...",
"compatibleAgents" : "agents...",
"pauseComment" : "comment...",
"triggers" : "triggers...",
"branches" : "branches...",
"steps" : "steps...",
"externalStatusAllowed" : true,
"agent-requirements" : "agent-requirements...",
"webUrl" : "webUrl",
"inherited" : true,
"snapshot-dependencies" : "snapshot-dependencies...",
"name" : "name",
"vcs-root-entries" : "vcs-root-entries...",
"projectName" : "projectName",
"projectId" : "projectId",
"parameters" : "properties...",
"locator" : "locator"
},
"details" : "details",
"type" : "user",
"user" : {
"lastLogin" : "lastLogin",
"roles" : {
"role" : [ "role..." ]
},
"groups" : {
"count" : 8,
"group" : [ "group..." ]
},
"hasPassword" : true,
"password" : "password",
"enabled2FA" : true,
"name" : "name",
"realm" : "realm",
"id" : 3,
"href" : "href",
"locator" : "locator",
"email" : "email",
"properties" : {
"count" : 1,
"property" : [ {
"inherited" : true,
"name" : "name",
"type" : "type...",
"value" : "value"
} ],
"href" : "href"
},
"username" : "username",
"avatars" : {
"urlToSize80" : "urlToSize80",
"urlToSize28" : "urlToSize28",
"urlToSize40" : "urlToSize40",
"urlToSize32" : "urlToSize32",
"urlToSize20" : "urlToSize20",
"urlToSize64" : "urlToSize64",
"urlToSize56" : "urlToSize56"
}
},
"properties" : {
"count" : 1,
"property" : [ {
"inherited" : true,
"name" : "name",
"type" : "type...",
"value" : "value"
} ],
"href" : "href"
}
}
Thanks for your feedback!