PHPackages                             kbsali/redmine-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. kbsali/redmine-api

ActiveLibrary[API Development](/categories/api)

kbsali/redmine-api
==================

Redmine API client

v2.9.0(2mo ago)4221.1M—7.3%179[24 issues](https://github.com/kbsali/php-redmine-api/issues)[3 PRs](https://github.com/kbsali/php-redmine-api/pulls)20MITPHPPHP ^7.4 || ^8.0CI passing

Since Oct 8Pushed 1mo ago36 watchersCompare

[ Source](https://github.com/kbsali/php-redmine-api)[ Packagist](https://packagist.org/packages/kbsali/redmine-api)[ Docs](https://github.com/kbsali/php-redmine-api)[ RSS](/packages/kbsali-redmine-api/feed)WikiDiscussions v2.x Synced 1mo ago

READMEChangelog (10)Dependencies (18)Versions (78)Used By (20)

PHP Redmine API
===============

[](#php-redmine-api)

[![Latest Version](https://camo.githubusercontent.com/0b46199b9fdc8037e13c8735ca0a108bae9c61d7b2aab62a0de11dba60bf9950/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f72656c656173652f6b6273616c692f7068702d7265646d696e652d6170692e737667)](https://github.com/kbsali/php-redmine-api/releases)[![Software License](https://camo.githubusercontent.com/0d72c4cb15193b9e2e0f21dfc6ce0c8a1f49edd2719e2f9550808afd5e329576/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d626c756576696f6c65742e737667)](LICENSE)[![Build Status](https://github.com/kbsali/php-redmine-api/actions/workflows/tests.yml/badge.svg?branch=v2.x)](https://github.com/kbsali/php-redmine-api/actions)[![Codecov](https://camo.githubusercontent.com/c7ece9f26424d34ecfcd6403a764fb2f9e7e005a94423f726b59bb0e4012f478/68747470733a2f2f636f6465636f762e696f2f67682f6b6273616c692f7068702d7265646d696e652d6170692f67726170682f62616467652e7376673f746f6b656e3d34503664416144624a39)](https://codecov.io/gh/kbsali/php-redmine-api)[![Total Downloads](https://camo.githubusercontent.com/a9cb14a8011f154e6957e72b168cd4d4b5118bfc2a1f5f717286085bd335082b/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6b6273616c692f7265646d696e652d6170692e737667)](https://packagist.org/packages/kbsali/redmine-api)

A simple PHP Object Oriented wrapper for Redmine API.

Uses [Redmine API](https://www.redmine.org/projects/redmine/wiki/Rest_api/).

Features
--------

[](#features)

- Follows PSR-4 conventions and coding standard: autoload friendly
- Choose between using native `cURL` function or any [PSR-18 HTTP client implementation ](https://packagist.org/providers/psr/http-client-implementation)like [Guzzle](https://github.com/guzzle/guzzle) for handling http connections
- [mid-level API](docs/usage.md#mid-level-api) e.g. ```
    $client->getApi('issue')->create(['project_id' => 1, 'subject' => 'issue title']);

    $response = $client->getApi('issue')->getLastResponse();
    ```
- [low-level API](docs/usage.md#low-level-api) e.g. ```
    $response = $client->request(
        HttpFactory::makeJsonRequest(
            'POST',
            '/issues.json',
            '{"issue":{"project_id":1,"subject":"issue title"}}',
        ),
    );
    ```

Supported Redmine versions
--------------------------

[](#supported-redmine-versions)

We support (and run tests against) the [latest supported Redmine versions](https://www.redmine.org/projects/redmine/wiki/Download#Versions-status-and-releases-policy)that receive security updates.

- Redmine 6.1.x
- Redmine 6.0.x
- Redmine 5.1.x

Nevertheless, you can also use this library for all older Redmine versions. In this case, however, be aware that some features might not be supported by your Redmine server.

If a new Redmine version enables new features that are not yet supported with this library, you are welcome to [create an issue](https://github.com/kbsali/php-redmine-api/issues).

Requirements
------------

[](#requirements)

- PHP ^7.4 || ^8.0
- The PHP [SimpleXML](https://php.net/manual/en/book.simplexml.php) extension
- The PHP [JSON](https://php.net/manual/en/book.json.php) extension
- Enabled REST web service on your Redmine server
    - Go to Administration -&gt; Settings -&gt; Api (`/settings/edit?tab=api`) and check the "Enable REST web service" box
    - Obtain your *API access key* in your profile page: `/my/account`
    - (or use your *username &amp; password*; not recommended)

### Optional

[](#optional)

- The PHP [cURL](https://php.net/manual/en/book.curl.php) extension if you want to use the native `cURL` functions.
- [PHPUnit](https://phpunit.de/) &gt;= 9.0 (optional) to run the test suite

Todo
----

[](#todo)

- Tracking of Redmine API feature support in [\#305](https://github.com/kbsali/php-redmine-api/issues/305)
- Check header's response code (especially for POST/PUT/DELETE requests)
    - See

Limitations / Missing Redmine-API
---------------------------------

[](#limitations--missing-redmine-api)

Redmine is missing some APIs for a full remote management of the data:

- List of activities &amp; roles:
- [Open issues because of missing Redmine API](https://github.com/kbsali/php-redmine-api/labels/pending%3A%20missing%20api)

Install
-------

[](#install)

By using [Composer](https://getcomposer.org/) you can simply run:

```
$ php composer.phar require kbsali/redmine-api
```

at the root of your projects. To utilize the library, include Composer's `vendor/autoload.php` in the scripts that will use the `Redmine` classes.

For example,

```
