Need help with your APIs? I offer API discovery, governance & evangelism services. Explore services →
API Evangelist API Evangelist
Discovery
Learnings
Guidance
Toolbox
Alignment
API Evangelist LLC

TeamCity Agents API

Manage build agents

TeamCity Agents API is one of 17 APIs that TeamCity publishes on the APIs.io network, described by a machine-readable OpenAPI specification.

This API exposes 1 JSON Schema definition.

Tagged areas include Agents. The published artifact set on APIs.io includes an OpenAPI specification, API documentation, an API reference, authentication docs, a JSON-LD context, and 1 JSON Schema.

This API exposes 6 operations across 4 paths, and defines 27 schemas. It is described by OpenAPI 3.0.3, at version 2024.12.1.

Requests are made against a single base URL, https://{server}/app/rest.

6 operations 4 paths 27 schemas 4 GET2 PUT

Metadata

The identity and technical contract details declared by the specification.

Specification
OpenAPI 3.0.3
API Version
2024.12.1
Base URL
https://teamcity.example.com/app/rest
Authentication
HTTP Bearer, HTTP Basic
Contact
Resource Areas
1

Authentication & Security 2

TeamCity Agents API declares 2 security schemes for authenticating requests. It accepts HTTP bearer tokens (bearerAuth). It accepts HTTP basic authentication (basicAuth). By default, every request must be authenticated.

  • bearerAuth — Bearer token authentication using access tokens
  • basicAuth — HTTP Basic authentication with username and password

Paths & Operations 6

Across 4 paths, the API surfaces 6 operations — 4 GET, 2 PUT. Each is listed below with its method, path, parameters, and response codes.

Agents 6

Manage build agents

GET
/agents
Get All Agents
getAllAgents 2 params → 200
GET
/agents/{agentLocator}
Get Agent
getAgent 2 params → 200404
GET
/agents/{agentLocator}/enabled
Get Agent Enabled Status
getAgentEnabledStatus 1 param → 200
PUT
/agents/{agentLocator}/enabled
Set Agent Enabled Status
setAgentEnabledStatus 1 param body → 200
GET
/agents/{agentLocator}/authorized
Get Agent Authorized Status
getAgentAuthorizedStatus 1 param → 200
PUT
/agents/{agentLocator}/authorized
Set Agent Authorized Status
setAgentAuthorizedStatus 1 param body → 200

Schemas 27

The contract defines 27 schemas that model the data the API accepts and returns. The most detailed are Build (21 properties), BuildType (12 properties), Agent (12 properties), TestOccurrence (11 properties). Each schema is shown below with its type and property counts.

ProblemOccurrence
object
8 properties
BuildType
object
12 properties
Triggers
object
2 properties
ProblemOccurrences
object
2 properties
Files
object
3 properties
Properties
object
3 properties
Test
object
3 properties
Property
object
4 properties
Projects
object
3 properties
Group
object
5 properties
Steps
object
2 properties
TestOccurrences
object
3 properties
Agent
object
12 properties
Project
object
10 properties
Roles
object
1 property
Agents
object
3 properties
Groups
object
2 properties
TestOccurrence
object
11 properties
Change
object
9 properties
BuildTypes
object
2 properties
User
object
8 properties
Role
object
3 properties
FileChanges
object
2 properties
AgentPool
object
6 properties
Build
object
21 properties
TriggeredBy
object
4 properties
Changes
object
2 properties

Specification

The full machine-readable OpenAPI contract behind this narrative.

Source

teamcity-agents-api-openapi.yml Raw ↑

Other APIs TeamCity publishes across the network.

TeamCity Agent Pools API
TeamCity Audit API
TeamCity Build Configurations API
TeamCity Build Queue API
TeamCity Builds API
TeamCity Changes API
TeamCity Cloud API
TeamCity Investigations API
TeamCity Mutes API
TeamCity Problems API
TeamCity Projects API
TeamCity Server API