TeamCity REST API Reference 2024.07 Help

BuildTriggeringOptions

Contains build dependency and queue and dependency settings available in the Run Custom Build dialog in TeamCity UI. Assign an instance of this class to the Build.TriggeringOptions field when sending POST requests to the /app/rest/buildQueue endpoint.

Related Help article: Running Custom Build

Properties

cleanSources

Returns true if the agent should clear its build checkout directory and pull all sources anew; otherwise, false.

cleanSourcesInAllDependencies

Returns true if the current 'cleanSources' behavior also be applied to all snapshot dependency builds, otherwise, false.

rebuildAllDependencies

Use true to prevent the build from reusing any of its snapshot dependency builds and re-run all dependency configurations; false to let TeamCity decide which snapshot builds should be re-run and which have suitable builds.

rebuildFailedOrIncompleteDependencies

true to re-run all failed, failed to start, and canceled snapshot dependency builds; false to let TeamCity decide which snapshot builds should be re-run and which have suitable builds.

queueAtTop

true to place the build at the top spot of the build queue, false to let TeamCity automatically process this build.

freezeSettings

Use true to collect all code commits and versioned settings right away; false to do this when build is assigned to the agent and is ready to start.

tagDependencies

Use true to label all dependency builds with tags specified in the Build.Tags field; false to label the current build only.

rebuildDependencies

The list of snapshot dependencies that should be rebuilt. Should only be used when both rebuildAllDependencies and rebuildFailedOrIncompleteDependencies fields equal false.

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.

<buildTriggeringOptions cleanSources="true" cleanSourcesInAllDependencies="false" freezeSettings="true" queueAtTop="true" rebuildAllDependencies="true" rebuildFailedOrIncompleteDependencies="false" tagDependencies="true"> <rebuildDependencies count="123" href="string" nextHref="string" prevHref="string"> <buildType>[[[buildType...|buildtype.html]]]</buildType> </rebuildDependencies> </buildTriggeringOptions>
{ "cleanSources" : true, "rebuildFailedOrIncompleteDependencies" : false, "queueAtTop" : true, "cleanSourcesInAllDependencies" : false, "rebuildDependencies" : { "buildType" : [ "[[[buildType...|buildtype.html]]]" ], "count" : 4, "prevHref" : "prevHref", "href" : "href", "nextHref" : "nextHref" }, "tagDependencies" : true, "rebuildAllDependencies" : true, "freezeSettings" : true }
Last modified: 23 September 2024