This package is not installable via Composer 1.x, please make sure you upgrade to Composer 2+. Read more about our Composer 1.x deprecation policy.
This package is abandoned and no longer maintained. No replacement package was suggested.
There is no license information available for the latest version (1.0.0) of this package.

TeamCity API wrapper for PHP - usable with or without Laravel 5

1.0.0 2017-09-14 10:04 UTC

This package is not auto-updated.

Last update: 2021-11-17 06:38:13 UTC


Latest Stable Version Total Downloads Monthly Downloads License Latest Unstable Version

A simple PHP wrapper for the API of your TeamCity instance which may or may not be used as a Laravel package.

This package lacks most API functions provided by TeamCity due to the sheer amount of endpoints. If you need any of the missing functions, just add it to the API class and create a pull request.

Table of Contents


The package can be installed via composer by running

composer require simon-wessel/teamcity-api

Standalone usage

$url = "";
$username = "myusername";
$password = "mypassword";

$teamCityApi = new SimonWessel\TeamCityApi\TeamCityApi($url, $username, $password);

$builds = $teamCityApi->getBuilds();

Usage with Laravel

1. Setup

The package supports package auto-discovery which has been introduced in Laravel 5.5. If you are using 5.5 or above, you can skip this step.

Otherwise you have to add the Service Provider to the providers array in your config/app.php file:


And if you want to use the Facade, you have to add it to the aliases array in the same file:

'TeamCity' => \SimonWessel\TeamCityApi\Facade::class,

2. Configuration

You will need to configure a TeamCity user account with all permissions for the data and actions you want to access. You can either set the following environment variables in your .env file:


Or alternatively you can publish the package config file and adjust the settings in there. To do this run this command:

php artisan vendor:publish --provider="SimonWessel\TeamCityApi\ServiceProvider"

You will get a new config file config/teamcity.php with the available settings.

3. Usage

You can access the API with the Facade:


Or calling the Service Provider singleton directly: