PHPackages                             productsupcom/jenkins-php-api - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. productsupcom/jenkins-php-api

ActiveLibrary[API Development](/categories/api)

productsupcom/jenkins-php-api
=============================

Library to control Jenkins via PHP through JSON api

2.0.0(4y ago)139.8k4[2 PRs](https://github.com/productsupcom/jenkins-php-api/pulls)proprietaryPHPPHP &gt;=5.5.0

Since Jun 19Pushed 2y ago13 watchersCompare

[ Source](https://github.com/productsupcom/jenkins-php-api)[ Packagist](https://packagist.org/packages/productsupcom/jenkins-php-api)[ Docs](https://github.com/productsupcom/jenkins-php-api)[ RSS](/packages/productsupcom-jenkins-php-api/feed)WikiDiscussions master Synced 4w ago

READMEChangelog (7)DependenciesVersions (13)Used By (0)

Jenkins PHP API
===============

[](#jenkins-php-api)

This version of the Jenkins PHP API is based on . It's more OOP (means a clearer API) than the original and has some more features.

It wraps the API calls of the Jenkins API.

Getting started
---------------

[](#getting-started)

First you need to instantiate the connection:

```
    $jenkins = new Jenkins('http://host.org:8080');
```

If your Jenkins needs authentication, you need to pass a URL like this : `'http://user:token@host.org:8080'`.

There are always two ways to instanciate an item and get the data you want:

1. Use the classes directly (`new Job('myjob', $jenkins)`). In this case you have to instanciate Jenkins first and pass it as second constructor argument.
2. Use methods of Jenkins: `(new Jenkins('myurl'))->getJob('myjob')`

Get the color of the job
------------------------

[](#get-the-color-of-the-job)

```
    $job = $jenkins->getJob("dev2-pull");
    var_dump($job->getColor());
    //string(4) "blue"
```

Launch a Job
------------

[](#launch-a-job)

Will launch the job and return imidiatly

```
    $job = $jenkins->getJob("clone-deploy")->launch();
```

Will launch the job and wait until the job is finished

```
    $job = $jenkins->getJob("clone-deploy")->launchAndWait();
```

List the jobs of a given view
-----------------------------

[](#list-the-jobs-of-a-given-view)

```
    $view = $jenkins->getView('madb_deploy');
    foreach ($view->getJobs() as $job) {
      var_dump($job->getName());
    }
    //string(13) "altlinux-pull"
    //string(8) "dev-pull"
    //string(9) "dev2-pull"
    //string(11) "fedora-pull"
```

List builds and their status
----------------------------

[](#list-builds-and-their-status)

```
    $job = $jenkins->getJob('dev2-pull');
    foreach ($job->getBuilds() as $build) {
      var_dump($build->getNumber());
      var_dump($build->getResult());
    }
    //int(122)
    //string(7) "SUCCESS"
    //int(121)
    //string(7) "FAILURE"
```

Check if Jenkins is available
-----------------------------

[](#check-if-jenkins-is-available)

```
    var_dump($jenkins->isAvailable());
    //bool(true);
```

For more information, see the [Jenkins API](https://wiki.jenkins-ci.org/display/JENKINS/Remote+access+API).

###  Health Score

35

—

LowBetter than 77% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity25

Limited adoption so far

Community22

Small or concentrated contributor base

Maturity65

Established project with proven stability

 Bus Factor2

2 contributors hold 50%+ of commits

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~304 days

Recently: every ~456 days

Total

7

Last Release

1689d ago

Major Versions

0.1.5 → 2.0.02021-11-15

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/586405?v=4)[Boris Penck](/maintainers/0bp)[@0bp](https://github.com/0bp)

---

Top Contributors

[![chbiel](https://avatars.githubusercontent.com/u/1297702?v=4)](https://github.com/chbiel "chbiel (53 commits)")[![srogier](https://avatars.githubusercontent.com/u/814069?v=4)](https://github.com/srogier "srogier (27 commits)")[![agallou](https://avatars.githubusercontent.com/u/320372?v=4)](https://github.com/agallou "agallou (20 commits)")[![nickdaugherty](https://avatars.githubusercontent.com/u/1103700?v=4)](https://github.com/nickdaugherty "nickdaugherty (10 commits)")[![terwey](https://avatars.githubusercontent.com/u/1596124?v=4)](https://github.com/terwey "terwey (8 commits)")[![0bp](https://avatars.githubusercontent.com/u/586405?v=4)](https://github.com/0bp "0bp (5 commits)")[![m038-pup](https://avatars.githubusercontent.com/u/50737551?v=4)](https://github.com/m038-pup "m038-pup (2 commits)")[![Borales](https://avatars.githubusercontent.com/u/1118933?v=4)](https://github.com/Borales "Borales (2 commits)")[![KuiKui](https://avatars.githubusercontent.com/u/748924?v=4)](https://github.com/KuiKui "KuiKui (1 commits)")[![ianfixes](https://avatars.githubusercontent.com/u/583459?v=4)](https://github.com/ianfixes "ianfixes (1 commits)")[![philipwhitt](https://avatars.githubusercontent.com/u/5478888?v=4)](https://github.com/philipwhitt "philipwhitt (1 commits)")[![carsten-neuendorf](https://avatars.githubusercontent.com/u/26010248?v=4)](https://github.com/carsten-neuendorf "carsten-neuendorf (1 commits)")

---

Tags

engineering

### Embed Badge

![Health badge](/badges/productsupcom-jenkins-php-api/health.svg)

```
[![Health](https://phpackages.com/badges/productsupcom-jenkins-php-api/health.svg)](https://phpackages.com/packages/productsupcom-jenkins-php-api)
```

###  Alternatives

[exsyst/swagger

A php library to manipulate Swagger specifications

35916.4M7](/packages/exsyst-swagger)[hubspot/api-client

Hubspot API client

24016.2M19](/packages/hubspot-api-client)[pocketmine/bedrock-protocol

An implementation of the Minecraft: Bedrock Edition protocol in PHP

172445.0k11](/packages/pocketmine-bedrock-protocol)[botman/driver-telegram

Telegram driver for BotMan

93459.5k6](/packages/botman-driver-telegram)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
