TeamCity REST API Reference 2024.07 Help

Manage Global Server Settings

Send GET and PUT requests to the <server_URL>/app/rest/server/globalSettings endpoint to check and modify common server properties: server and artifacts URL, maximum allowed artifact size, VCS polling interval, and so on.

Requests to this endpoint modify settings accessible on the Administration | Global Settings page of TeamCity UI. See this article for the complete list of available settings: TeamCity Configuration and Maintenance.

Request payloads conform to the ServerGlobalSettings scheme.

Example 1: Get Current Server Settings

Request:

https://MyTCServer:8111/app/rest/server/globalSettings

Sample response:

<serverGlobalSettings artifactDirectories="system/artifacts&#xD;&#xA;system/artifacts-test" artifactsDomainIsolation="true" artifactsUrl="https://mycompany.storage" defaultExecutionTimeout="0" defaultQuietPeriod="60" defaultVCSCheckInterval="60" enforceDefaultVCSCheckInterval="false" maxArtifactSize="314572800" maxArtifactsNumber="1000" rootUrl="https://MyTCServer:8111" useEncryption="false" />
{ "artifactDirectories": "system/artifacts\r\nsystem/artifacts-test", "artifactsDomainIsolation": true, "artifactsUrl": "https://mycompany.storage", "defaultExecutionTimeout": 0, "defaultQuietPeriod": 60, "defaultVCSCheckInterval": 60, "enforceDefaultVCSCheckInterval": false, "maxArtifactSize": 314572800, "maxArtifactsNumber": 1000, "rootUrl": "https://MyTCServer:8111", "useEncryption": false }

Example 2: Modify the Server URL

Request:

http://localhost:8111/app/rest/server/globalSettings

Request body:

<serverGlobalSettings rootUrl="https://MyTCServer:8111"/>
{ "rootUrl": "http://localhost:8111" }

Example 3: Modify the Encryption Key

Request:

https://MyTCServer:8111/app/rest/server/globalSettings

Request body:

<serverGlobalSettings useEncryption="true" encryptionKey="AbCDEfGH12345" />
{ "useEncryption": true, "encryptionKey": "AbCDEfGH12345" }
Last modified: 19 June 2023