Client for TeamCity REST API written in Kotlin
Switch branches/tags
Nothing to show
Clone or download

teamcity-rest-client JetBrains team project License plugin status Download

Client for TeamCity REST API written in Kotlin. The code snippet below will download *.zip artifacts from the latest successful build with tag publish of the specified build configuration to out directory.

val docs = BuildConfigurationId("Kotlin_StandardLibraryDocumentation")
val build = TeamCityInstanceFactory.guestAuth("").builds()
build!!.downloadArtifacts("*.zip", File("out"))

Another snippet will run a build on your own server

val tc = TeamCityInstanceFactory.httpAuth(
        "https://myserver.local", "login", "password")

val buildConfiguration = tc.buildConfiguration(BuildConfigurationId("BuildConfId"))
val build = buildConfiguration.runBuild(
        parameters = mapOf("myparameter1" to "value", "myparameter2" to "value")

Published on jcenter

You can add the dependency in your build.gradle file:

repositories {

dependencies {
    compile "org.jetbrains.teamcity:teamcity-rest-client:PACKAGE_VERSION"


Your contributions are welcome, please read the for details.