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.
note
For security purposes, payloads for
GET
requests do not include values of the "Custom encryption key" setting. However, you can still modify it by sendingPUT
requests that setencryptionKey
property values.
Request:
GEThttps://MyTCServer:8111/app/rest/server/globalSettings
Sample response:
<serverGlobalSettings
artifactDirectories="system/artifacts
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
}
Request:
PUThttp://localhost:8111/app/rest/server/globalSettings
Request body:
<serverGlobalSettings rootUrl="https://MyTCServer:8111"/>
{
"rootUrl": "http://localhost:8111"
}
Request:
PUThttps://MyTCServer:8111/app/rest/server/globalSettings
Request body:
<serverGlobalSettings
useEncryption="true"
encryptionKey="AbCDEfGH12345"
/>
{
"useEncryption": true,
"encryptionKey": "AbCDEfGH12345"
}
Thanks for your feedback!