TeamCity REST API Reference 2025.11 Help

Cleanup

Stores current settings according to which the TeamCity performs periodic clean-ups. Use the /app/rest/server/cleanup endpoint to view and edit these settings.

Related Help article: TeamCity Data Clean-Up

Properties

enabled

true if the periodic clean-up is enabled; otherwise, false.

maxCleanupDuration

The maximum clean-up duration (in munutes). If a clean-up exceeds this limit, TeamCity will automatically abort it.

daily

The daily clean-up schedule. Returns null if advanced cron expression is used.

cron

The cron expression that represents a clean-up schedule. Returns null if the default daily schedule is used.

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.

<cleanup enabled="true" maxCleanupDuration="120"> <daily hour="3" minute="30"/> <cron day="?" dayWeek="JAN" hour="0" minute="30" month="JAN"/> </cleanup>
{ "cron" : { "hour" : "0", "month" : "JAN", "dayWeek" : "JAN", "day" : "?", "minute" : "30" }, "daily" : { "hour" : 3, "minute" : 30 }, "maxCleanupDuration" : 120, "enabled" : true }
Last modified: 02 December 2025