# TeamCity

> Run and follow your TeamCity builds: trigger builds with a branch and parameters, wait for them, read their status, log, problems, tests and artifacts, cancel, pin, tag and comment on them, pause configurations, manage agents, and start a workflow when a build fails, finishes or starts, or an agent disconnects.

App · 24 actions. Web page: https://docs.lodol.com/docs/integrations/teamcity

## Actions

### Activate build configuration

Activate a paused build configuration, so its triggers start builds again.

**Inputs**

- Build configuration (`build_configuration`, text, required): The build configuration: pick one, or type its ID (such as MyProject_Build) or paste its page's address.

**Outputs**

- `changed` (true/false): Whether this step changed it; false when it already was
- `description` (text): Its description
- `id` (text): The build configuration's ID, such as MyProject_Build
- `link` (text): A link to it in TeamCity
- `name` (text): Its name
- `paused` (true/false): Whether it's paused, so its triggers start no builds
- `project_id` (text): Its project's ID
- `project_name` (text): Its project's name

**Example output**

```json
{
  "changed": true,
  "description": "Builds and tests the shop",
  "id": "Shop_Build",
  "link": "https://example.teamcity.com/buildConfiguration/Shop_Build",
  "name": "Build",
  "paused": false,
  "project_id": "Shop",
  "project_name": "Shop"
}
```

### Cancel build

Cancel a build: one in the queue is taken out of it, and one that's running is stopped. A build that has finished is left as it is.

**Inputs**

- Build (`build_id`, text, required): The build's ID: pick a recent build, use the id of an earlier step such as Trigger build's, or paste the build's address. It isn't the build number (#42).
- Comment (`comment`, text): Why it's cancelled, shown with it in TeamCity. Defaults to Canceled by Lodol.

**Outputs**

- `agent` (text): The agent that runs or ran it
- `branch` (text): The branch it builds; empty for a configuration without branches
- `build_configuration_id` (text): Its build configuration's ID
- `build_configuration_name` (text): Its build configuration's name
- `cancel_comment` (text): The comment given when it was cancelled
- `canceled_by` (text): Who cancelled it, if someone did
- `changed` (true/false): Whether it was queued or running and is now cancelled
- `changes` (list): The commits it builds that earlier builds didn't
- `comment` (text): Its comment
- `comment_by` (text): Who wrote the comment
- `default_branch` (true/false): Whether it builds the default branch
- `duration_seconds` (number): How long it ran, or has run so far, in seconds
- `finished_at` (text): When it finished (ISO 8601); empty until it does
- `id` (number): The build's ID, the number in its address; other steps take this, not the build number
- `link` (text): A link to the build in TeamCity
- `number` (text): The build number people see, such as 42; empty while queued
- `outcome` (text): In a word: queued, running, success, failure, canceled or failed to start
- `parameters` (object): The parameters it was started with, by name
- `percent_complete` (number): How far along it is, 0 to 100
- `personal` (true/false): Whether it's a personal build
- `pinned` (true/false): Whether it's pinned, so clean-up keeps it
- `problems` (number): How many build problems it has, such as a failing step
- `project_id` (text): Its project's ID
- `project_name` (text): Its project's name
- `queued_at` (text): When it was queued (ISO 8601)
- `started_at` (text): When it started (ISO 8601); empty while queued
- `state` (text): queued, running or finished
- `status` (text): SUCCESS or FAILURE (so far, while it runs); UNKNOWN when it was cancelled
- `status_text` (text): TeamCity's summary, such as Tests failed: 1, passed: 12
- `tags` (list): Its tags
- `tests_failed` (number): How many tests failed
- `tests_ignored` (number): How many tests were ignored
- `tests_muted` (number): How many failed tests are muted
- `tests_passed` (number): How many tests passed
- `triggered_by` (text): Who or what started it: a person's name, a commit, a schedule or another build
- `triggered_by_username` (text): The username of the person who started it, if one did
- `triggered_type` (text): How it was started: user, vcs, schedule, buildType and more
- `wait_reason` (text): Why a queued build is waiting, such as no agents

**Example output**

```json
{
  "agent": "agent-1",
  "branch": "main",
  "build_configuration_id": "Shop_Build",
  "build_configuration_name": "Build",
  "cancel_comment": "Canceled by Lodol",
  "canceled_by": "lodol",
  "changed": true,
  "changes": [],
  "comment": "Release candidate",
  "comment_by": "dana",
  "default_branch": true,
  "duration_seconds": 195.0,
  "finished_at": "2026-01-31T10:03:20Z",
  "id": 1234,
  "link": "https://example.teamcity.com/buildConfiguration/Shop_Build/1234",
  "number": "42",
  "outcome": "canceled",
  "parameters": {
    "env.TARGET": "staging"
  },
  "percent_complete": 100,
  "personal": false,
  "pinned": false,
  "problems": 1,
  "project_id": "Shop",
  "project_name": "Shop",
  "queued_at": "2026-01-31T10:00:00Z",
  "started_at": "2026-01-31T10:00:05Z",
  "state": "finished",
  "status": "UNKNOWN",
  "status_text": "Canceled",
  "tags": [
    "release"
  ],
  "tests_failed": 1,
  "tests_ignored": 0,
  "tests_muted": 0,
  "tests_passed": 12,
  "triggered_by": "Dana Smith",
  "triggered_by_username": "dana",
  "triggered_type": "user",
  "wait_reason": ""
}
```

### Comment on build

Set a build's comment, which TeamCity shows with it, replacing the one it had. Leave the comment blank to remove it.

**Inputs**

- Build (`build_id`, text, required): The build's ID: pick a recent build, use the id of an earlier step such as Trigger build's, or paste the build's address. It isn't the build number (#42).
- Comment (`comment`, text): The comment, such as Deployed to staging.

**Outputs**

- `agent` (text): The agent that runs or ran it
- `branch` (text): The branch it builds; empty for a configuration without branches
- `build_configuration_id` (text): Its build configuration's ID
- `build_configuration_name` (text): Its build configuration's name
- `cancel_comment` (text): The comment given when it was cancelled
- `canceled_by` (text): Who cancelled it, if someone did
- `changes` (list): The commits it builds that earlier builds didn't
- `comment` (text): Its comment
- `comment_by` (text): Who wrote the comment
- `default_branch` (true/false): Whether it builds the default branch
- `duration_seconds` (number): How long it ran, or has run so far, in seconds
- `finished_at` (text): When it finished (ISO 8601); empty until it does
- `id` (number): The build's ID, the number in its address; other steps take this, not the build number
- `link` (text): A link to the build in TeamCity
- `number` (text): The build number people see, such as 42; empty while queued
- `outcome` (text): In a word: queued, running, success, failure, canceled or failed to start
- `parameters` (object): The parameters it was started with, by name
- `percent_complete` (number): How far along it is, 0 to 100
- `personal` (true/false): Whether it's a personal build
- `pinned` (true/false): Whether it's pinned, so clean-up keeps it
- `problems` (number): How many build problems it has, such as a failing step
- `project_id` (text): Its project's ID
- `project_name` (text): Its project's name
- `queued_at` (text): When it was queued (ISO 8601)
- `started_at` (text): When it started (ISO 8601); empty while queued
- `state` (text): queued, running or finished
- `status` (text): SUCCESS or FAILURE (so far, while it runs); UNKNOWN when it was cancelled
- `status_text` (text): TeamCity's summary, such as Tests failed: 1, passed: 12
- `tags` (list): Its tags
- `tests_failed` (number): How many tests failed
- `tests_ignored` (number): How many tests were ignored
- `tests_muted` (number): How many failed tests are muted
- `tests_passed` (number): How many tests passed
- `triggered_by` (text): Who or what started it: a person's name, a commit, a schedule or another build
- `triggered_by_username` (text): The username of the person who started it, if one did
- `triggered_type` (text): How it was started: user, vcs, schedule, buildType and more
- `wait_reason` (text): Why a queued build is waiting, such as no agents

**Example output**

```json
{
  "agent": "agent-1",
  "branch": "main",
  "build_configuration_id": "Shop_Build",
  "build_configuration_name": "Build",
  "cancel_comment": "",
  "canceled_by": "",
  "changes": [],
  "comment": "Release candidate",
  "comment_by": "dana",
  "default_branch": true,
  "duration_seconds": 195.0,
  "finished_at": "2026-01-31T10:03:20Z",
  "id": 1234,
  "link": "https://example.teamcity.com/buildConfiguration/Shop_Build/1234",
  "number": "42",
  "outcome": "failure",
  "parameters": {
    "env.TARGET": "staging"
  },
  "percent_complete": 100,
  "personal": false,
  "pinned": false,
  "problems": 1,
  "project_id": "Shop",
  "project_name": "Shop",
  "queued_at": "2026-01-31T10:00:00Z",
  "started_at": "2026-01-31T10:00:05Z",
  "state": "finished",
  "status": "FAILURE",
  "status_text": "Tests failed: 1 (1 new), passed: 12",
  "tags": [
    "release"
  ],
  "tests_failed": 1,
  "tests_ignored": 0,
  "tests_muted": 0,
  "tests_passed": 12,
  "triggered_by": "Dana Smith",
  "triggered_by_username": "dana",
  "triggered_type": "user",
  "wait_reason": ""
}
```

### Disable agent

Disable a build agent, such as for maintenance: it finishes the build it's running and takes no more until enabled.

**Inputs**

- Agent (`agent`, text, required): The agent: pick one, or type its name or ID.
- Comment (`comment`, text): Why, shown with the agent in TeamCity, such as Disk full.

**Outputs**

- `authorized` (true/false): Whether it's authorized to run builds
- `changed` (true/false): Whether this step changed it; false when it already was
- `connected` (true/false): Whether it's connected to the server
- `enabled` (true/false): Whether it's enabled, so it takes builds
- `enabled_comment` (text): The comment given when it was last enabled or disabled
- `enabled_comment_by` (text): Who gave that comment
- `id` (number): The agent's ID
- `ip` (text): Its IP address
- `last_seen_at` (text): When it was last in touch (ISO 8601)
- `link` (text): A link to the agent in TeamCity
- `name` (text): Its name
- `pool` (text): Its agent pool
- `running_build_configuration_id` (text): The configuration of that build
- `running_build_id` (number): The ID of the build it's running; 0 if none
- `up_to_date` (true/false): Whether it runs the server's agent version

**Example output**

```json
{
  "authorized": true,
  "changed": true,
  "connected": true,
  "enabled": false,
  "enabled_comment": "Disk full",
  "enabled_comment_by": "lodol",
  "id": 3,
  "ip": "10.0.0.12",
  "last_seen_at": "2026-01-31T10:03:20Z",
  "link": "https://example.teamcity.com/agent/3",
  "name": "agent-1",
  "pool": "Default",
  "running_build_configuration_id": "",
  "running_build_id": 0,
  "up_to_date": true
}
```

### Enable agent

Enable a build agent, so it takes builds again.

**Inputs**

- Agent (`agent`, text, required): The agent: pick one, or type its name or ID.
- Comment (`comment`, text): Why, shown with the agent in TeamCity.

**Outputs**

- `authorized` (true/false): Whether it's authorized to run builds
- `changed` (true/false): Whether this step changed it; false when it already was
- `connected` (true/false): Whether it's connected to the server
- `enabled` (true/false): Whether it's enabled, so it takes builds
- `enabled_comment` (text): The comment given when it was last enabled or disabled
- `enabled_comment_by` (text): Who gave that comment
- `id` (number): The agent's ID
- `ip` (text): Its IP address
- `last_seen_at` (text): When it was last in touch (ISO 8601)
- `link` (text): A link to the agent in TeamCity
- `name` (text): Its name
- `pool` (text): Its agent pool
- `running_build_configuration_id` (text): The configuration of that build
- `running_build_id` (number): The ID of the build it's running; 0 if none
- `up_to_date` (true/false): Whether it runs the server's agent version

**Example output**

```json
{
  "authorized": true,
  "changed": true,
  "connected": true,
  "enabled": true,
  "enabled_comment": "Back",
  "enabled_comment_by": "",
  "id": 3,
  "ip": "10.0.0.12",
  "last_seen_at": "2026-01-31T10:03:20Z",
  "link": "https://example.teamcity.com/agent/3",
  "name": "agent-1",
  "pool": "Default",
  "running_build_configuration_id": "",
  "running_build_id": 0,
  "up_to_date": true
}
```

### Get artifact

Get one of a build's artifacts: its size and download addresses, and its text when asked, such as a report a later step reads.

**Inputs**

- Build (`build_id`, text, required): The build's ID: pick a recent build, use the id of an earlier step such as Trigger build's, or paste the build's address. It isn't the build number (#42).
- Path (`path`, text, required): The artifact's path, as List build artifacts gives it, such as reports/summary.txt.
- Read its text (`include_text`, true/false): Also read the file's text, up to 1 MB. For text files only. Default: `false`.

**Outputs**

- `build_id` (number): The build's ID
- `download_url` (text): Where to download it with an access token, such as in an HTTP step with an Authorization: Bearer header
- `modified_at` (text): When it was last changed (ISO 8601)
- `name` (text): The file's name
- `path` (text): Its path in the build's artifacts
- `size` (number): Its size in bytes
- `text` (text): Its text, when asked for; up to 1 MB
- `text_truncated` (true/false): Whether the file is longer than the text given
- `web_url` (text): Where a person signed in to TeamCity downloads it

**Example output**

```json
{
  "build_id": 1234,
  "download_url": "https://example.teamcity.com/app/rest/builds/id:1234/artifacts/content/reports/summary.txt",
  "modified_at": "2026-01-31T10:03:18Z",
  "name": "summary.txt",
  "path": "reports/summary.txt",
  "size": 120,
  "text": "12 passed, 1 failed",
  "text_truncated": false,
  "web_url": "https://example.teamcity.com/repository/download/Shop_Build/1234:id/reports/summary.txt"
}
```

### Get build

Get a build: whether it's queued, running or finished, its status and TeamCity's summary of it, its branch, the changes it builds, who started it, and its test counts.

**Inputs**

- Build (`build_id`, text, required): The build's ID: pick a recent build, use the id of an earlier step such as Trigger build's, or paste the build's address. It isn't the build number (#42).

**Outputs**

- `agent` (text): The agent that runs or ran it
- `branch` (text): The branch it builds; empty for a configuration without branches
- `build_configuration_id` (text): Its build configuration's ID
- `build_configuration_name` (text): Its build configuration's name
- `cancel_comment` (text): The comment given when it was cancelled
- `canceled_by` (text): Who cancelled it, if someone did
- `changes` (list): The commits it builds that earlier builds didn't
- `comment` (text): Its comment
- `comment_by` (text): Who wrote the comment
- `default_branch` (true/false): Whether it builds the default branch
- `duration_seconds` (number): How long it ran, or has run so far, in seconds
- `finished_at` (text): When it finished (ISO 8601); empty until it does
- `id` (number): The build's ID, the number in its address; other steps take this, not the build number
- `link` (text): A link to the build in TeamCity
- `number` (text): The build number people see, such as 42; empty while queued
- `outcome` (text): In a word: queued, running, success, failure, canceled or failed to start
- `parameters` (object): The parameters it was started with, by name
- `percent_complete` (number): How far along it is, 0 to 100
- `personal` (true/false): Whether it's a personal build
- `pinned` (true/false): Whether it's pinned, so clean-up keeps it
- `problems` (number): How many build problems it has, such as a failing step
- `project_id` (text): Its project's ID
- `project_name` (text): Its project's name
- `queued_at` (text): When it was queued (ISO 8601)
- `started_at` (text): When it started (ISO 8601); empty while queued
- `state` (text): queued, running or finished
- `status` (text): SUCCESS or FAILURE (so far, while it runs); UNKNOWN when it was cancelled
- `status_text` (text): TeamCity's summary, such as Tests failed: 1, passed: 12
- `tags` (list): Its tags
- `tests_failed` (number): How many tests failed
- `tests_ignored` (number): How many tests were ignored
- `tests_muted` (number): How many failed tests are muted
- `tests_passed` (number): How many tests passed
- `triggered_by` (text): Who or what started it: a person's name, a commit, a schedule or another build
- `triggered_by_username` (text): The username of the person who started it, if one did
- `triggered_type` (text): How it was started: user, vcs, schedule, buildType and more
- `wait_reason` (text): Why a queued build is waiting, such as no agents

**Example output**

```json
{
  "agent": "agent-1",
  "branch": "main",
  "build_configuration_id": "Shop_Build",
  "build_configuration_name": "Build",
  "cancel_comment": "",
  "canceled_by": "",
  "changes": [
    {
      "comment": "Fix the checkout total",
      "date": "2026-01-31T09:58:02Z",
      "id": "88",
      "link": "https://example.teamcity.com/change/88",
      "username": "dana",
      "version": "3f9a1c2d4e5b"
    }
  ],
  "comment": "Release candidate",
  "comment_by": "dana",
  "default_branch": true,
  "duration_seconds": 195.0,
  "finished_at": "2026-01-31T10:03:20Z",
  "id": 1234,
  "link": "https://example.teamcity.com/buildConfiguration/Shop_Build/1234",
  "number": "42",
  "outcome": "failure",
  "parameters": {
    "env.TARGET": "staging"
  },
  "percent_complete": 100,
  "personal": false,
  "pinned": false,
  "problems": 1,
  "project_id": "Shop",
  "project_name": "Shop",
  "queued_at": "2026-01-31T10:00:00Z",
  "started_at": "2026-01-31T10:00:05Z",
  "state": "finished",
  "status": "FAILURE",
  "status_text": "Tests failed: 1 (1 new), passed: 12",
  "tags": [
    "release"
  ],
  "tests_failed": 1,
  "tests_ignored": 0,
  "tests_muted": 0,
  "tests_passed": 12,
  "triggered_by": "Dana Smith",
  "triggered_by_username": "dana",
  "triggered_type": "user",
  "wait_reason": ""
}
```

### Get build configuration

Get a build configuration: whether it's paused, its parameters (the ones Trigger build can set), its steps and triggers, and its latest finished build.

**Inputs**

- Build configuration (`build_configuration`, text, required): The build configuration: pick one, or type its ID (such as MyProject_Build) or paste its page's address.

**Outputs**

- `description` (text): Its description
- `id` (text): The build configuration's ID, such as MyProject_Build
- `last_build` (object): Its latest finished build, on any branch, as Get build gives it
- `link` (text): A link to it in TeamCity
- `name` (text): Its name
- `parameters` (list): Its parameters, which Trigger build can set
- `paused` (true/false): Whether it's paused, so its triggers start no builds
- `project_id` (text): Its project's ID
- `project_name` (text): Its project's name
- `steps` (list): Its build steps
- `triggers` (list): Its enabled triggers, such as vcsTrigger or schedulingTrigger

**Example output**

```json
{
  "description": "Builds and tests the shop",
  "id": "Shop_Build",
  "last_build": {
    "agent": "agent-1",
    "branch": "main",
    "build_configuration_id": "Shop_Build",
    "build_configuration_name": "Build",
    "cancel_comment": "",
    "canceled_by": "",
    "changes": [
      {
        "comment": "Fix the checkout total",
        "date": "2026-01-31T09:58:02Z",
        "id": "88",
        "link": "https://example.teamcity.com/change/88",
        "username": "dana",
        "version": "3f9a1c2d4e5b"
      }
    ],
    "comment": "Release candidate",
    "comment_by": "dana",
    "default_branch": true,
    "duration_seconds": 195.0,
    "finished_at": "2026-01-31T10:03:20Z",
    "id": 1234,
    "link": "https://example.teamcity.com/buildConfiguration/Shop_Build/1234",
    "number": "42",
    "outcome": "failure",
    "parameters": {
      "env.TARGET": "staging"
    },
    "percent_complete": 100,
    "personal": false,
    "pinned": false,
    "problems": 1,
    "project_id": "Shop",
    "project_name": "Shop",
    "queued_at": "2026-01-31T10:00:00Z",
    "started_at": "2026-01-31T10:00:05Z",
    "state": "finished",
    "status": "FAILURE",
    "status_text": "Tests failed: 1 (1 new), passed: 12",
    "tags": [
      "release"
    ],
    "tests_failed": 1,
    "tests_ignored": 0,
    "tests_muted": 0,
    "tests_passed": 12,
    "triggered_by": "Dana Smith",
    "triggered_by_username": "dana",
    "triggered_type": "user",
    "wait_reason": ""
  },
  "link": "https://example.teamcity.com/buildConfiguration/Shop_Build",
  "name": "Build",
  "parameters": [
    {
      "name": "env.TARGET",
      "secret": false,
      "value": "staging"
    },
    {
      "name": "env.DEPLOY_KEY",
      "secret": true,
      "value": ""
    }
  ],
  "paused": false,
  "project_id": "Shop",
  "project_name": "Shop",
  "steps": [
    {
      "enabled": true,
      "name": "Test",
      "type": "simpleRunner"
    }
  ],
  "triggers": [
    "vcsTrigger"
  ]
}
```

### Get build log

Get a build's log, its last lines, as TeamCity's Build Log tab shows them, or only the lines that mention an error or failure.

**Inputs**

- Build (`build_id`, text, required): The build's ID: pick a recent build, use the id of an earlier step such as Trigger build's, or paste the build's address. It isn't the build number (#42).
- Last lines (`last_lines`, number): How many lines to get, from the end, 1 to 5000. Defaults to 200. From 1 to 5000.
- Only errors (`errors_only`, true/false): Only the lines that say error, fail, failed or exception. Default: `false`.

**Outputs**

- `build_id` (number): The build's ID
- `count` (number): How many lines are given
- `link` (text): A link to the build's log in TeamCity
- `log` (text): The log's last lines, oldest first
- `state` (text): The build's state: queued, running or finished
- `status` (text): The build's status: SUCCESS, FAILURE or UNKNOWN
- `total_lines` (number): How many lines the log has (of those asked for)
- `truncated` (true/false): Whether earlier lines were left out

**Example output**

```json
{
  "build_id": 1234,
  "count": 2,
  "link": "https://example.teamcity.com/buildConfiguration/Shop_Build/1234?buildTab=log",
  "log": "[10:03:19] Step 1/1: Test (Command Line)\n[10:03:20] Process exited with code 1",
  "state": "finished",
  "status": "FAILURE",
  "total_lines": 2,
  "truncated": false
}
```

### Get build problems

Get why a build failed: the problems TeamCity reported, such as a step's exit code, failed tests or a compilation error.

**Inputs**

- Build (`build_id`, text, required): The build's ID: pick a recent build, use the id of an earlier step such as Trigger build's, or paste the build's address. It isn't the build number (#42).
- How many (`limit`, number): The most problems to list, 1 to 500. Defaults to 100. From 1 to 500.

**Outputs**

- `build_id` (number): The build's ID
- `count` (number): How many problems
- `problems` (list): Its problems

**Example output**

```json
{
  "build_id": 1234,
  "count": 1,
  "problems": [
    {
      "details": "Process exited with code 1",
      "identity": "TC_EXIT_CODE1",
      "investigated": false,
      "muted": false,
      "new": true,
      "type": "TC_EXIT_CODE"
    }
  ]
}
```

### Get build tests

Get a build's failed tests, with each failure's message, or all its tests.

**Inputs**

- Build (`build_id`, text, required): The build's ID: pick a recent build, use the id of an earlier step such as Trigger build's, or paste the build's address. It isn't the build number (#42).
- Tests (`status`, text): Only the failed tests, or all of them. One of: `failed`, `all`. Default: `failed`.
- How many (`limit`, number): The most tests to list, 1 to 500. Defaults to 100. From 1 to 500.

**Outputs**

- `build_id` (number): The build's ID
- `count` (number): How many tests are listed
- `failed` (number): How many of them failed
- `tests` (list): Its tests

**Example output**

```json
{
  "build_id": 1234,
  "count": 1,
  "failed": 1,
  "tests": [
    {
      "details": "expected 12.10 but was 11.00",
      "duration_ms": 41,
      "ignored": false,
      "investigated": false,
      "muted": false,
      "name": "checkout: total includes tax",
      "new_failure": true,
      "status": "FAILURE",
      "test_id": "-123456789"
    }
  ]
}
```

### Get project

Get a TeamCity project with its build configurations and subprojects.

**Inputs**

- Project (`project`, text, required): The project: pick one, or type its ID (such as MyProject) or paste its page's address.

**Outputs**

- `archived` (true/false): Whether it's archived
- `build_configurations` (list): Its build configurations
- `description` (text): Its description
- `id` (text): The project's ID, such as MyProject
- `link` (text): A link to the project in TeamCity
- `name` (text): The project's name
- `parent_project_id` (text): The project it's in; _Root for a top-level project
- `parent_project_name` (text): The name of the project it's in
- `subprojects` (list): Its subprojects

**Example output**

```json
{
  "archived": false,
  "build_configurations": [
    {
      "description": "Builds and tests the shop",
      "id": "Shop_Build",
      "link": "https://example.teamcity.com/buildConfiguration/Shop_Build",
      "name": "Build",
      "paused": false,
      "project_id": "Shop",
      "project_name": "Shop"
    }
  ],
  "description": "The web shop",
  "id": "Shop",
  "link": "https://example.teamcity.com/project/Shop",
  "name": "Shop",
  "parent_project_id": "_Root",
  "parent_project_name": "<Root project>",
  "subprojects": []
}
```

### List agents

List build agents, with whether each is connected, authorized and enabled, its pool and the build it's running.

**Inputs**

- Connected (`connected`, text): Only connected agents (Yes) or only disconnected ones (No). One of: `any`, `yes`, `no`. Default: `any`.
- Authorized (`authorized`, text): Only authorized agents (Yes) or only unauthorized ones (No). One of: `any`, `yes`, `no`. Default: `any`.
- Enabled (`enabled`, text): Only enabled agents (Yes) or only disabled ones (No). One of: `any`, `yes`, `no`. Default: `any`.
- Agent pool (`pool`, text): Only agents in this pool, such as Default.
- How many (`limit`, number): The most agents to list, 1 to 500. Defaults to 100. From 1 to 500.

**Outputs**

- `agents` (list): The agents
- `count` (number): How many are listed

**Example output**

```json
{
  "agents": [
    {
      "authorized": true,
      "connected": true,
      "enabled": true,
      "enabled_comment": "",
      "enabled_comment_by": "",
      "id": 3,
      "ip": "10.0.0.12",
      "last_seen_at": "2026-01-31T10:03:20Z",
      "link": "https://example.teamcity.com/agent/3",
      "name": "agent-1",
      "pool": "Default",
      "running_build_configuration_id": "",
      "running_build_id": 0,
      "up_to_date": true
    }
  ],
  "count": 1
}
```

### List build artifacts

List the files a build published as artifacts, in one folder or all of them, each with its download address.

**Inputs**

- Build (`build_id`, text, required): The build's ID: pick a recent build, use the id of an earlier step such as Trigger build's, or paste the build's address. It isn't the build number (#42).
- Folder (`folder`, text): The folder to list, such as reports. Leave blank for the top.
- Include subfolders (`recursive`, true/false): Also list what's in every folder inside it. Default: `false`.

**Outputs**

- `build_configuration_id` (text): Its build configuration's ID
- `build_id` (number): The build's ID
- `count` (number): How many are listed
- `files` (list): The files and folders

**Example output**

```json
{
  "build_configuration_id": "Shop_Build",
  "build_id": 1234,
  "count": 1,
  "files": [
    {
      "download_url": "https://example.teamcity.com/app/rest/builds/id:1234/artifacts/content/reports/summary.txt",
      "folder": false,
      "modified_at": "2026-01-31T10:03:18Z",
      "name": "summary.txt",
      "path": "reports/summary.txt",
      "size": 120
    }
  ]
}
```

### List build configurations

List build configurations, of every project or one (its subprojects too), with whether each is paused.

**Inputs**

- Project (`project`, text): Only this project's, its subprojects' included. Leave blank for every project.
- Paused (`paused`, text): Every configuration, only paused ones (Yes) or only active ones (No). One of: `any`, `yes`, `no`. Default: `any`.
- How many (`limit`, number): The most configurations to list, 1 to 500. Defaults to 25. From 1 to 500.

**Outputs**

- `build_configurations` (list): The build configurations
- `count` (number): How many are listed

**Example output**

```json
{
  "build_configurations": [
    {
      "description": "Builds and tests the shop",
      "id": "Shop_Build",
      "link": "https://example.teamcity.com/buildConfiguration/Shop_Build",
      "name": "Build",
      "paused": false,
      "project_id": "Shop",
      "project_name": "Shop"
    }
  ],
  "count": 1
}
```

### List builds

List builds, the latest first, of every configuration, one or a project's, by branch, status, state, tag and time.

**Inputs**

- Build configuration (`build_configuration`, text): Only builds of this build configuration. Leave blank for every one.
- Project (`project`, text): Only this project's, its subprojects' included. Leave blank for every project. A build configuration, when given, is used instead.
- Branch (`branch`, text): Only builds of this branch, as TeamCity shows it, such as main or refs/heads/main. Leave blank for every branch.
- Status (`status`, text): Only successful or only failed builds. One of: `any` (Any status), `success` (Successful), `failure` (Failed). Default: `any`.
- State (`state`, text): Finished builds, running ones, queued ones or all of them. One of: `finished`, `running`, `queued`, `any` (Any state). Default: `finished`.
- Since (`since`, date and time): Only builds queued or started at or after this time.
- Until (`until`, date and time): Only builds started before this time.
- Tag (`tag`, text): Only builds with this tag, such as release.
- Include cancelled (`include_canceled`, true/false): Also list builds someone cancelled. Default: `false`.
- How many (`limit`, number): The most builds to list, 1 to 500. Defaults to 25. From 1 to 500.

**Outputs**

- `builds` (list): The builds, the latest first
- `count` (number): How many builds are listed

**Example output**

```json
{
  "builds": [
    {
      "agent": "agent-1",
      "branch": "main",
      "build_configuration_id": "Shop_Build",
      "build_configuration_name": "Build",
      "cancel_comment": "",
      "canceled_by": "",
      "changes": [
        {
          "comment": "Fix the checkout total",
          "date": "2026-01-31T09:58:02Z",
          "id": "88",
          "link": "https://example.teamcity.com/change/88",
          "username": "dana",
          "version": "3f9a1c2d4e5b"
        }
      ],
      "comment": "Release candidate",
      "comment_by": "dana",
      "default_branch": true,
      "duration_seconds": 195.0,
      "finished_at": "2026-01-31T10:03:20Z",
      "id": 1234,
      "link": "https://example.teamcity.com/buildConfiguration/Shop_Build/1234",
      "number": "42",
      "outcome": "failure",
      "parameters": {
        "env.TARGET": "staging"
      },
      "percent_complete": 100,
      "personal": false,
      "pinned": false,
      "problems": 1,
      "project_id": "Shop",
      "project_name": "Shop",
      "queued_at": "2026-01-31T10:00:00Z",
      "started_at": "2026-01-31T10:00:05Z",
      "state": "finished",
      "status": "FAILURE",
      "status_text": "Tests failed: 1 (1 new), passed: 12",
      "tags": [
        "release"
      ],
      "tests_failed": 1,
      "tests_ignored": 0,
      "tests_muted": 0,
      "tests_passed": 12,
      "triggered_by": "Dana Smith",
      "triggered_by_username": "dana",
      "triggered_type": "user",
      "wait_reason": ""
    }
  ],
  "count": 1
}
```

### List projects

List TeamCity projects by name, with the project each is in.

**Inputs**

- Name contains (`search`, text): Only projects whose name has these letters, such as web.
- In project (`parent_project`, text): Only the projects directly in this one.
- Include archived (`include_archived`, true/false): Also list archived projects. Default: `false`.
- How many (`limit`, number): The most projects to list, 1 to 500. Defaults to 25. From 1 to 500.

**Outputs**

- `count` (number): How many projects are listed
- `projects` (list): The projects

**Example output**

```json
{
  "count": 1,
  "projects": [
    {
      "archived": false,
      "description": "The web shop",
      "id": "Shop",
      "link": "https://example.teamcity.com/project/Shop",
      "name": "Shop",
      "parent_project_id": "_Root"
    }
  ]
}
```

### List queued builds

List the builds waiting in TeamCity's queue, the next to start first, with why each is waiting.

**Inputs**

- Build configuration (`build_configuration`, text): Only builds of this build configuration. Leave blank for every one.
- Project (`project`, text): Only this project's, its subprojects' included. Leave blank for every project. A build configuration, when given, is used instead.
- How many (`limit`, number): The most builds to list, 1 to 500. Defaults to 25. From 1 to 500.

**Outputs**

- `builds` (list): The builds, the latest first
- `count` (number): How many builds are listed

**Example output**

```json
{
  "builds": [
    {
      "agent": "",
      "branch": "main",
      "build_configuration_id": "Shop_Build",
      "build_configuration_name": "Build",
      "cancel_comment": "",
      "canceled_by": "",
      "changes": [],
      "comment": "Started from Lodol",
      "comment_by": "dana",
      "default_branch": true,
      "duration_seconds": 0.0,
      "finished_at": "",
      "id": 1234,
      "link": "https://example.teamcity.com/buildConfiguration/Shop_Build/1234",
      "number": "",
      "outcome": "queued",
      "parameters": {
        "env.TARGET": "staging"
      },
      "percent_complete": 0,
      "personal": false,
      "pinned": false,
      "problems": 0,
      "project_id": "Shop",
      "project_name": "Shop",
      "queued_at": "2026-01-31T10:00:00Z",
      "started_at": "",
      "state": "queued",
      "status": "",
      "status_text": "",
      "tags": [],
      "tests_failed": 0,
      "tests_ignored": 0,
      "tests_muted": 0,
      "tests_passed": 0,
      "triggered_by": "Dana Smith",
      "triggered_by_username": "dana",
      "triggered_type": "user",
      "wait_reason": "Waiting for an idle compatible agent"
    }
  ],
  "count": 1
}
```

### Pause build configuration

Pause a build configuration, so its triggers start no builds until it's activated. Builds already queued or running carry on, and it can still be run by hand.

**Inputs**

- Build configuration (`build_configuration`, text, required): The build configuration: pick one, or type its ID (such as MyProject_Build) or paste its page's address.

**Outputs**

- `changed` (true/false): Whether this step changed it; false when it already was
- `description` (text): Its description
- `id` (text): The build configuration's ID, such as MyProject_Build
- `link` (text): A link to it in TeamCity
- `name` (text): Its name
- `paused` (true/false): Whether it's paused, so its triggers start no builds
- `project_id` (text): Its project's ID
- `project_name` (text): Its project's name

**Example output**

```json
{
  "changed": true,
  "description": "Builds and tests the shop",
  "id": "Shop_Build",
  "link": "https://example.teamcity.com/buildConfiguration/Shop_Build",
  "name": "Build",
  "paused": true,
  "project_id": "Shop",
  "project_name": "Shop"
}
```

### Pin build

Pin a finished build, so TeamCity's clean-up never deletes it or its artifacts, such as a release.

**Inputs**

- Build (`build_id`, text, required): The build's ID: pick a recent build, use the id of an earlier step, or paste the build's address. Only a finished build can be pinned.
- Comment (`comment`, text): Why it's pinned, shown with it in TeamCity.

**Outputs**

- `agent` (text): The agent that runs or ran it
- `branch` (text): The branch it builds; empty for a configuration without branches
- `build_configuration_id` (text): Its build configuration's ID
- `build_configuration_name` (text): Its build configuration's name
- `cancel_comment` (text): The comment given when it was cancelled
- `canceled_by` (text): Who cancelled it, if someone did
- `changes` (list): The commits it builds that earlier builds didn't
- `comment` (text): Its comment
- `comment_by` (text): Who wrote the comment
- `default_branch` (true/false): Whether it builds the default branch
- `duration_seconds` (number): How long it ran, or has run so far, in seconds
- `finished_at` (text): When it finished (ISO 8601); empty until it does
- `id` (number): The build's ID, the number in its address; other steps take this, not the build number
- `link` (text): A link to the build in TeamCity
- `number` (text): The build number people see, such as 42; empty while queued
- `outcome` (text): In a word: queued, running, success, failure, canceled or failed to start
- `parameters` (object): The parameters it was started with, by name
- `percent_complete` (number): How far along it is, 0 to 100
- `personal` (true/false): Whether it's a personal build
- `pin_comment` (text): The comment given with the pin or unpin
- `pinned` (true/false): Whether it's pinned, so clean-up keeps it
- `problems` (number): How many build problems it has, such as a failing step
- `project_id` (text): Its project's ID
- `project_name` (text): Its project's name
- `queued_at` (text): When it was queued (ISO 8601)
- `started_at` (text): When it started (ISO 8601); empty while queued
- `state` (text): queued, running or finished
- `status` (text): SUCCESS or FAILURE (so far, while it runs); UNKNOWN when it was cancelled
- `status_text` (text): TeamCity's summary, such as Tests failed: 1, passed: 12
- `tags` (list): Its tags
- `tests_failed` (number): How many tests failed
- `tests_ignored` (number): How many tests were ignored
- `tests_muted` (number): How many failed tests are muted
- `tests_passed` (number): How many tests passed
- `triggered_by` (text): Who or what started it: a person's name, a commit, a schedule or another build
- `triggered_by_username` (text): The username of the person who started it, if one did
- `triggered_type` (text): How it was started: user, vcs, schedule, buildType and more
- `wait_reason` (text): Why a queued build is waiting, such as no agents

**Example output**

```json
{
  "agent": "agent-1",
  "branch": "main",
  "build_configuration_id": "Shop_Build",
  "build_configuration_name": "Build",
  "cancel_comment": "",
  "canceled_by": "",
  "changes": [],
  "comment": "Release candidate",
  "comment_by": "dana",
  "default_branch": true,
  "duration_seconds": 195.0,
  "finished_at": "2026-01-31T10:03:20Z",
  "id": 1234,
  "link": "https://example.teamcity.com/buildConfiguration/Shop_Build/1234",
  "number": "42",
  "outcome": "failure",
  "parameters": {
    "env.TARGET": "staging"
  },
  "percent_complete": 100,
  "personal": false,
  "pin_comment": "Keep the release build",
  "pinned": true,
  "problems": 1,
  "project_id": "Shop",
  "project_name": "Shop",
  "queued_at": "2026-01-31T10:00:00Z",
  "started_at": "2026-01-31T10:00:05Z",
  "state": "finished",
  "status": "FAILURE",
  "status_text": "Tests failed: 1 (1 new), passed: 12",
  "tags": [
    "release"
  ],
  "tests_failed": 1,
  "tests_ignored": 0,
  "tests_muted": 0,
  "tests_passed": 12,
  "triggered_by": "Dana Smith",
  "triggered_by_username": "dana",
  "triggered_type": "user",
  "wait_reason": ""
}
```

### Tag build

Add tags to a build and take others off, keeping the rest, such as release or deployed-to-staging.

**Inputs**

- Build (`build_id`, text, required): The build's ID: pick a recent build, use the id of an earlier step such as Trigger build's, or paste the build's address. It isn't the build number (#42).
- Add tags (`add_tags`, list): Tags to add.
- Remove tags (`remove_tags`, list): Tags to take off.

**Outputs**

- `added` (list): The tags it didn't have before
- `agent` (text): The agent that runs or ran it
- `branch` (text): The branch it builds; empty for a configuration without branches
- `build_configuration_id` (text): Its build configuration's ID
- `build_configuration_name` (text): Its build configuration's name
- `cancel_comment` (text): The comment given when it was cancelled
- `canceled_by` (text): Who cancelled it, if someone did
- `changes` (list): The commits it builds that earlier builds didn't
- `comment` (text): Its comment
- `comment_by` (text): Who wrote the comment
- `default_branch` (true/false): Whether it builds the default branch
- `duration_seconds` (number): How long it ran, or has run so far, in seconds
- `finished_at` (text): When it finished (ISO 8601); empty until it does
- `id` (number): The build's ID, the number in its address; other steps take this, not the build number
- `link` (text): A link to the build in TeamCity
- `number` (text): The build number people see, such as 42; empty while queued
- `outcome` (text): In a word: queued, running, success, failure, canceled or failed to start
- `parameters` (object): The parameters it was started with, by name
- `percent_complete` (number): How far along it is, 0 to 100
- `personal` (true/false): Whether it's a personal build
- `pinned` (true/false): Whether it's pinned, so clean-up keeps it
- `problems` (number): How many build problems it has, such as a failing step
- `project_id` (text): Its project's ID
- `project_name` (text): Its project's name
- `queued_at` (text): When it was queued (ISO 8601)
- `removed` (list): The tags taken off
- `started_at` (text): When it started (ISO 8601); empty while queued
- `state` (text): queued, running or finished
- `status` (text): SUCCESS or FAILURE (so far, while it runs); UNKNOWN when it was cancelled
- `status_text` (text): TeamCity's summary, such as Tests failed: 1, passed: 12
- `tags` (list): Its tags
- `tests_failed` (number): How many tests failed
- `tests_ignored` (number): How many tests were ignored
- `tests_muted` (number): How many failed tests are muted
- `tests_passed` (number): How many tests passed
- `triggered_by` (text): Who or what started it: a person's name, a commit, a schedule or another build
- `triggered_by_username` (text): The username of the person who started it, if one did
- `triggered_type` (text): How it was started: user, vcs, schedule, buildType and more
- `wait_reason` (text): Why a queued build is waiting, such as no agents

**Example output**

```json
{
  "added": [
    "approved"
  ],
  "agent": "agent-1",
  "branch": "main",
  "build_configuration_id": "Shop_Build",
  "build_configuration_name": "Build",
  "cancel_comment": "",
  "canceled_by": "",
  "changes": [],
  "comment": "Release candidate",
  "comment_by": "dana",
  "default_branch": true,
  "duration_seconds": 195.0,
  "finished_at": "2026-01-31T10:03:20Z",
  "id": 1234,
  "link": "https://example.teamcity.com/buildConfiguration/Shop_Build/1234",
  "number": "42",
  "outcome": "failure",
  "parameters": {
    "env.TARGET": "staging"
  },
  "percent_complete": 100,
  "personal": false,
  "pinned": false,
  "problems": 1,
  "project_id": "Shop",
  "project_name": "Shop",
  "queued_at": "2026-01-31T10:00:00Z",
  "removed": [],
  "started_at": "2026-01-31T10:00:05Z",
  "state": "finished",
  "status": "FAILURE",
  "status_text": "Tests failed: 1 (1 new), passed: 12",
  "tags": [
    "release",
    "approved"
  ],
  "tests_failed": 1,
  "tests_ignored": 0,
  "tests_muted": 0,
  "tests_passed": 12,
  "triggered_by": "Dana Smith",
  "triggered_by_username": "dana",
  "triggered_type": "user",
  "wait_reason": ""
}
```

### Trigger build

Put a build of a configuration in the queue, as TeamCity's Run button does, on a branch and with parameters and a comment. It doesn't wait for the build: follow it with Wait for build.

**Inputs**

- Build configuration (`build_configuration`, text, required): The build configuration: pick one, or type its ID (such as MyProject_Build) or paste its page's address.
- Branch (`branch`, text): The branch to build, such as main or feature/login. Leave blank for the default branch.
- Parameters (`parameters`, object): Parameters to run it with, such as {"env.TARGET": "staging"}: configuration parameters, system.* properties and env.* environment variables. Leave blank for the configuration's own.
- Comment (`comment`, text): A comment on the build, shown with it in TeamCity.
- Put at top of queue (`queue_at_top`, true/false): Start it before the builds already waiting. Default: `false`.
- Clean checkout (`clean_checkout`, true/false): Delete the sources the agent has and check them out again. Default: `false`.

**Outputs**

- `agent` (text): The agent that runs or ran it
- `branch` (text): The branch it builds; empty for a configuration without branches
- `build_configuration_id` (text): Its build configuration's ID
- `build_configuration_name` (text): Its build configuration's name
- `cancel_comment` (text): The comment given when it was cancelled
- `canceled_by` (text): Who cancelled it, if someone did
- `changes` (list): The commits it builds that earlier builds didn't
- `comment` (text): Its comment
- `comment_by` (text): Who wrote the comment
- `default_branch` (true/false): Whether it builds the default branch
- `duration_seconds` (number): How long it ran, or has run so far, in seconds
- `finished_at` (text): When it finished (ISO 8601); empty until it does
- `id` (number): The build's ID, the number in its address; other steps take this, not the build number
- `link` (text): A link to the build in TeamCity
- `number` (text): The build number people see, such as 42; empty while queued
- `outcome` (text): In a word: queued, running, success, failure, canceled or failed to start
- `parameters` (object): The parameters it was started with, by name
- `percent_complete` (number): How far along it is, 0 to 100
- `personal` (true/false): Whether it's a personal build
- `pinned` (true/false): Whether it's pinned, so clean-up keeps it
- `problems` (number): How many build problems it has, such as a failing step
- `project_id` (text): Its project's ID
- `project_name` (text): Its project's name
- `queued_at` (text): When it was queued (ISO 8601)
- `started_at` (text): When it started (ISO 8601); empty while queued
- `state` (text): queued, running or finished
- `status` (text): SUCCESS or FAILURE (so far, while it runs); UNKNOWN when it was cancelled
- `status_text` (text): TeamCity's summary, such as Tests failed: 1, passed: 12
- `tags` (list): Its tags
- `tests_failed` (number): How many tests failed
- `tests_ignored` (number): How many tests were ignored
- `tests_muted` (number): How many failed tests are muted
- `tests_passed` (number): How many tests passed
- `triggered_by` (text): Who or what started it: a person's name, a commit, a schedule or another build
- `triggered_by_username` (text): The username of the person who started it, if one did
- `triggered_type` (text): How it was started: user, vcs, schedule, buildType and more
- `wait_reason` (text): Why a queued build is waiting, such as no agents

**Example output**

```json
{
  "agent": "",
  "branch": "main",
  "build_configuration_id": "Shop_Build",
  "build_configuration_name": "Build",
  "cancel_comment": "",
  "canceled_by": "",
  "changes": [],
  "comment": "Started from Lodol",
  "comment_by": "dana",
  "default_branch": true,
  "duration_seconds": 0.0,
  "finished_at": "",
  "id": 1234,
  "link": "https://example.teamcity.com/buildConfiguration/Shop_Build/1234",
  "number": "",
  "outcome": "queued",
  "parameters": {
    "env.TARGET": "staging"
  },
  "percent_complete": 0,
  "personal": false,
  "pinned": false,
  "problems": 0,
  "project_id": "Shop",
  "project_name": "Shop",
  "queued_at": "2026-01-31T10:00:00Z",
  "started_at": "",
  "state": "queued",
  "status": "",
  "status_text": "",
  "tags": [],
  "tests_failed": 0,
  "tests_ignored": 0,
  "tests_muted": 0,
  "tests_passed": 0,
  "triggered_by": "Dana Smith",
  "triggered_by_username": "dana",
  "triggered_type": "user",
  "wait_reason": "Waiting for an idle compatible agent"
}
```

### Unpin build

Unpin a build, so clean-up can delete it again under the project's rules.

**Inputs**

- Build (`build_id`, text, required): The build's ID: pick a recent build, use the id of an earlier step, or paste the build's address. Only a finished build can be pinned.
- Comment (`comment`, text): Why it's unpinned, shown in TeamCity.

**Outputs**

- `agent` (text): The agent that runs or ran it
- `branch` (text): The branch it builds; empty for a configuration without branches
- `build_configuration_id` (text): Its build configuration's ID
- `build_configuration_name` (text): Its build configuration's name
- `cancel_comment` (text): The comment given when it was cancelled
- `canceled_by` (text): Who cancelled it, if someone did
- `changes` (list): The commits it builds that earlier builds didn't
- `comment` (text): Its comment
- `comment_by` (text): Who wrote the comment
- `default_branch` (true/false): Whether it builds the default branch
- `duration_seconds` (number): How long it ran, or has run so far, in seconds
- `finished_at` (text): When it finished (ISO 8601); empty until it does
- `id` (number): The build's ID, the number in its address; other steps take this, not the build number
- `link` (text): A link to the build in TeamCity
- `number` (text): The build number people see, such as 42; empty while queued
- `outcome` (text): In a word: queued, running, success, failure, canceled or failed to start
- `parameters` (object): The parameters it was started with, by name
- `percent_complete` (number): How far along it is, 0 to 100
- `personal` (true/false): Whether it's a personal build
- `pin_comment` (text): The comment given with the pin or unpin
- `pinned` (true/false): Whether it's pinned, so clean-up keeps it
- `problems` (number): How many build problems it has, such as a failing step
- `project_id` (text): Its project's ID
- `project_name` (text): Its project's name
- `queued_at` (text): When it was queued (ISO 8601)
- `started_at` (text): When it started (ISO 8601); empty while queued
- `state` (text): queued, running or finished
- `status` (text): SUCCESS or FAILURE (so far, while it runs); UNKNOWN when it was cancelled
- `status_text` (text): TeamCity's summary, such as Tests failed: 1, passed: 12
- `tags` (list): Its tags
- `tests_failed` (number): How many tests failed
- `tests_ignored` (number): How many tests were ignored
- `tests_muted` (number): How many failed tests are muted
- `tests_passed` (number): How many tests passed
- `triggered_by` (text): Who or what started it: a person's name, a commit, a schedule or another build
- `triggered_by_username` (text): The username of the person who started it, if one did
- `triggered_type` (text): How it was started: user, vcs, schedule, buildType and more
- `wait_reason` (text): Why a queued build is waiting, such as no agents

**Example output**

```json
{
  "agent": "agent-1",
  "branch": "main",
  "build_configuration_id": "Shop_Build",
  "build_configuration_name": "Build",
  "cancel_comment": "",
  "canceled_by": "",
  "changes": [],
  "comment": "Release candidate",
  "comment_by": "dana",
  "default_branch": true,
  "duration_seconds": 195.0,
  "finished_at": "2026-01-31T10:03:20Z",
  "id": 1234,
  "link": "https://example.teamcity.com/buildConfiguration/Shop_Build/1234",
  "number": "42",
  "outcome": "failure",
  "parameters": {
    "env.TARGET": "staging"
  },
  "percent_complete": 100,
  "personal": false,
  "pin_comment": "",
  "pinned": false,
  "problems": 1,
  "project_id": "Shop",
  "project_name": "Shop",
  "queued_at": "2026-01-31T10:00:00Z",
  "started_at": "2026-01-31T10:00:05Z",
  "state": "finished",
  "status": "FAILURE",
  "status_text": "Tests failed: 1 (1 new), passed: 12",
  "tags": [
    "release"
  ],
  "tests_failed": 1,
  "tests_ignored": 0,
  "tests_muted": 0,
  "tests_passed": 12,
  "triggered_by": "Dana Smith",
  "triggered_by_username": "dana",
  "triggered_type": "user",
  "wait_reason": ""
}
```

### Wait for build

Wait until a build finishes, checking every minute without holding the workflow, then get it with its status. If it's still queued or running when the time is up, the step fails; the build carries on.

**Inputs**

- Build (`build_id`, text, required): The build's ID: pick a recent build, use the id of an earlier step such as Trigger build's, or paste the build's address. It isn't the build number (#42).
- Wait up to (minutes) (`max_wait_minutes`, number): How long after it was queued to wait, 1 to 1440 minutes. Defaults to 60. From 1 to 1440.

**Outputs**

- `agent` (text): The agent that runs or ran it
- `branch` (text): The branch it builds; empty for a configuration without branches
- `build_configuration_id` (text): Its build configuration's ID
- `build_configuration_name` (text): Its build configuration's name
- `cancel_comment` (text): The comment given when it was cancelled
- `canceled_by` (text): Who cancelled it, if someone did
- `changes` (list): The commits it builds that earlier builds didn't
- `comment` (text): Its comment
- `comment_by` (text): Who wrote the comment
- `default_branch` (true/false): Whether it builds the default branch
- `duration_seconds` (number): How long it ran, or has run so far, in seconds
- `finished_at` (text): When it finished (ISO 8601); empty until it does
- `id` (number): The build's ID, the number in its address; other steps take this, not the build number
- `link` (text): A link to the build in TeamCity
- `number` (text): The build number people see, such as 42; empty while queued
- `outcome` (text): In a word: queued, running, success, failure, canceled or failed to start
- `parameters` (object): The parameters it was started with, by name
- `percent_complete` (number): How far along it is, 0 to 100
- `personal` (true/false): Whether it's a personal build
- `pinned` (true/false): Whether it's pinned, so clean-up keeps it
- `problems` (number): How many build problems it has, such as a failing step
- `project_id` (text): Its project's ID
- `project_name` (text): Its project's name
- `queued_at` (text): When it was queued (ISO 8601)
- `started_at` (text): When it started (ISO 8601); empty while queued
- `state` (text): queued, running or finished
- `status` (text): SUCCESS or FAILURE (so far, while it runs); UNKNOWN when it was cancelled
- `status_text` (text): TeamCity's summary, such as Tests failed: 1, passed: 12
- `tags` (list): Its tags
- `tests_failed` (number): How many tests failed
- `tests_ignored` (number): How many tests were ignored
- `tests_muted` (number): How many failed tests are muted
- `tests_passed` (number): How many tests passed
- `triggered_by` (text): Who or what started it: a person's name, a commit, a schedule or another build
- `triggered_by_username` (text): The username of the person who started it, if one did
- `triggered_type` (text): How it was started: user, vcs, schedule, buildType and more
- `wait_reason` (text): Why a queued build is waiting, such as no agents

**Example output**

```json
{
  "agent": "agent-1",
  "branch": "main",
  "build_configuration_id": "Shop_Build",
  "build_configuration_name": "Build",
  "cancel_comment": "",
  "canceled_by": "",
  "changes": [
    {
      "comment": "Fix the checkout total",
      "date": "2026-01-31T09:58:02Z",
      "id": "88",
      "link": "https://example.teamcity.com/change/88",
      "username": "dana",
      "version": "3f9a1c2d4e5b"
    }
  ],
  "comment": "Release candidate",
  "comment_by": "dana",
  "default_branch": true,
  "duration_seconds": 195.0,
  "finished_at": "2026-01-31T10:03:20Z",
  "id": 1234,
  "link": "https://example.teamcity.com/buildConfiguration/Shop_Build/1234",
  "number": "42",
  "outcome": "failure",
  "parameters": {
    "env.TARGET": "staging"
  },
  "percent_complete": 100,
  "personal": false,
  "pinned": false,
  "problems": 1,
  "project_id": "Shop",
  "project_name": "Shop",
  "queued_at": "2026-01-31T10:00:00Z",
  "started_at": "2026-01-31T10:00:05Z",
  "state": "finished",
  "status": "FAILURE",
  "status_text": "Tests failed: 1 (1 new), passed: 12",
  "tags": [
    "release"
  ],
  "tests_failed": 1,
  "tests_ignored": 0,
  "tests_muted": 0,
  "tests_passed": 12,
  "triggered_by": "Dana Smith",
  "triggered_by_username": "dana",
  "triggered_type": "user",
  "wait_reason": ""
}
```
