PHPackages                             gradolol/php-jira-rest-client - 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. [HTTP &amp; Networking](/categories/http)
4. /
5. gradolol/php-jira-rest-client

ActiveLibrary[HTTP &amp; Networking](/categories/http)

gradolol/php-jira-rest-client
=============================

JIRA REST API Client for PHP Users.

1.33.1(7y ago)08Apache-2.0PHPPHP &gt;=5.5.9

Since Feb 3Pushed 7y agoCompare

[ Source](https://github.com/gradolol/php-jira-rest-client)[ Packagist](https://packagist.org/packages/gradolol/php-jira-rest-client)[ RSS](/packages/gradolol-php-jira-rest-client/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (6)Versions (105)Used By (0)

PHP JIRA Rest Client
====================

[](#php-jira-rest-client)

[![Latest Stable Version](https://camo.githubusercontent.com/a021286bb2f9e3e4b215ff7dbe1e76b5dd317d55812e866ddd99e5db41af73ec/68747470733a2f2f706f7365722e707567782e6f72672f6c6573737469662f7068702d6a6972612d726573742d636c69656e742f762f737461626c65)](https://packagist.org/packages/lesstif/php-jira-rest-client)[![Latest Unstable Version](https://camo.githubusercontent.com/b29dc668f71deb850f5a9eaff0b6f1e32d9f7a0c33fefdb857868569ba473b7b/68747470733a2f2f706f7365722e707567782e6f72672f6c6573737469662f7068702d6a6972612d726573742d636c69656e742f762f756e737461626c65)](https://packagist.org/packages/lesstif/php-jira-rest-client)[![Build Status](https://camo.githubusercontent.com/3a855d9dbce0f56fcdd483a951fd2edef94734f80180dc6988c25ae3fab94915/68747470733a2f2f7472617669732d63692e6f72672f6c6573737469662f7068702d6a6972612d726573742d636c69656e742e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/lesstif/php-jira-rest-client)[![StyleCI](https://camo.githubusercontent.com/6e4c04d11a4567e3273877842a2bdb8663948eb7b2faec574840ba35dbcf740d/68747470733a2f2f7374796c6563692e696f2f7265706f732f33303031353336392f736869656c643f6272616e63683d6d6173746572267374796c653d666c6174)](https://styleci.io/repos/30015369)[![Scrutinizer](https://camo.githubusercontent.com/1ee229c6ecd41753069ab60fac7a34ff1baca9beedbe5a44069d475edf9495f2/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f6c6573737469662f7068702d6a6972612d726573742d636c69656e742f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/lesstif/php-jira-rest-client/)[![Coverage Status](https://camo.githubusercontent.com/57c3bcbde86d40c32765269dc5491621523d09261dc6609b459ed3b7d3cccee0/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6769746875622f6c6573737469662f7068702d6a6972612d726573742d636c69656e742f62616467652e7376673f6272616e63683d6d6173746572)](https://coveralls.io/github/lesstif/php-jira-rest-client?branch=master)[![License](https://camo.githubusercontent.com/7fd04e054fd60e2bebe426ef17fcd54ee0f5b1c034fa953814d963827731f1f0/68747470733a2f2f706f7365722e707567782e6f72672f6c6573737469662f7068702d6a6972612d726573742d636c69656e742f6c6963656e7365)](https://packagist.org/packages/lesstif/php-jira-rest-client)[![Total Downloads](https://camo.githubusercontent.com/5c12fa9eb0f4f2ee3d6170ae0e0e2eba2fde0db52fde9d4fad9a481ed38ccf09/68747470733a2f2f706f7365722e707567782e6f72672f6c6573737469662f7068702d6a6972612d726573742d636c69656e742f646f776e6c6f616473)](https://packagist.org/packages/lesstif/php-jira-rest-client)[![Monthly Downloads](https://camo.githubusercontent.com/fe11a924a898eef4eeca47577c6084e9be6481a7bceafb0e8dfba6902b9804f9/68747470733a2f2f706f7365722e707567782e6f72672f6c6573737469662f7068702d6a6972612d726573742d636c69656e742f642f6d6f6e74686c79)](https://packagist.org/packages/lesstif/php-jira-rest-client)[![Daily Downloads](https://camo.githubusercontent.com/999a902a8c369a9789681b5814f64ae9f70981483e7ecab7e6434e0d787c8cf5/68747470733a2f2f706f7365722e707567782e6f72672f6c6573737469662f7068702d6a6972612d726573742d636c69656e742f642f6461696c79)](https://packagist.org/packages/lesstif/php-jira-rest-client)

Requirements
============

[](#requirements)

- PHP &gt;= 5.5.9
- [php JsonMapper](https://github.com/netresearch/jsonmapper)
- [phpdotenv](https://github.com/vlucas/phpdotenv)

Installation
============

[](#installation)

1. Download and Install PHP Composer.

    ```
    curl -sS https://getcomposer.org/installer | php
    ```
2. Next, run the Composer command to install the latest version of php jira rest client.

    ```
    php composer.phar require lesstif/php-jira-rest-client
    ```

    or add the following to your composer.json file.

    ```
    {
        "require": {
            "lesstif/php-jira-rest-client": "^1.19"
        }
    }
    ```
3. Then run Composer's install or update commands to complete installation.

    ```
    php composer.phar install
    ```
4. After installing, you need to require Composer's autoloader:

    ```
    require 'vendor/autoload.php';
    ```

**Laravel:** Once installed, if you are not using automatic package discovery, then you need to register the `JiraRestApi\JiraRestApiServiceProvider` service provider in your `config/app.php`.

Configuration
=============

[](#configuration)

you can choose loads environment variables either 'dotenv' or 'array'.

use dotenv
----------

[](#use-dotenv)

copy .env.example file to .env on your project root.

```
JIRA_HOST="https://your-jira.host.com"
JIRA_USER="jira-username"
JIRA_PASS="jira-password-OR-api-token"
# to enable session cookie authorization
# COOKIE_AUTH_ENABLED=true
# COOKIE_FILE=storage/jira-cookie.txt
# if you are behind a proxy, add proxy settings
PROXY_SERVER="your-proxy-server"
PROXY_PORT="proxy-port"
PROXY_USER="proxy-username"
PROXY_PASSWORD="proxy-password"
```

**Important Note:**As of March 15, 2018, in accordance to the [Atlassian REST API Policy](https://developer.atlassian.com/platform/marketplace/atlassian-rest-api-policy/), Basic auth with password to be deprecated. Instead of password, you should using [API token](https://confluence.atlassian.com/cloud/api-tokens-938839638.html).

**Laravel Users:**If you are developing with laravel framework(5.x), you must append above configuration to your application .env file.

use array
---------

[](#use-array)

create Service class with ArrayConfiguration parameter.

```
use JiraRestApi\Configuration\ArrayConfiguration;
use JiraRestApi\Issue\IssueService;

$iss = new IssueService(new ArrayConfiguration(
          array(
               'jiraHost' => 'https://your-jira.host.com',
               // for basic authorization:
               'jiraUser' => 'jira-username',
               'jiraPassword' => 'jira-password-OR-api-token',
               // to enable session cookie authorization (with basic authorization only)
               'cookieAuthEnabled' => true,
               'cookieFile' => storage_path('jira-cookie.txt'),
               // if you are behind a proxy, add proxy settings
               "proxyServer" => 'your-proxy-server',
               "proxyPort" => 'proxy-port',
               "proxyUser" => 'proxy-username',
               "proxyPassword" => 'proxy-password',
          )
   ));
```

Usage
=====

[](#usage)

Table of Contents
-----------------

[](#table-of-contents)

### Project

[](#project)

- [Create Project](#create-project)
- [Update Project](#update-project)
- [Delete Project](#delete-project)
- [Get Project Info](#get-project-info)
- [Get All Project list](#get-all-project-list)
- [Get Project Type](#get-project-type)
- [Get Project Version](#get-project-version)

### Custom Field

[](#custom-field)

- [Get All Field list](#get-all-field-list)
- [Create Custom Field](#create-custom-field)

### Issue

[](#issue)

- [Get Issue Info](#get-issue-info)
- [Create Issue](#create-issue)
- [Create Issue - bulk](#create-multiple-issues)
- [Create Sub Task](#create-sub-task)
- [Add Attachment](#add-attachment)
- [Update issue](#update-issue)
    - [Update Labels](#update-labels)
    - \[Update Fix Versions\](#update-fix versions)
- [Change assignee](#change-assignee)
- [Remove issue](#remove-issue)
- [Add comment](#add-comment)
- [Get comment](#get-comment)
- [Delete comment](#delete-comment)
- [Perform a transition on an issue](#perform-a-transition-on-an-issue)
- [Perform an advanced search, using the JQL](#perform-an-advanced-search)
    - [Simple JQL](#simple-query)
    - [JQL With pagination](#jql-with-pagination)
    - [Using JQL Query class](#jql-query-class)
- [Remote Issue Link](#remote-issue-link)
    - [Get Remote Issue Link](#get-remote-issue-link)
    - [Create Remote Issue Link](#create-remote-issue-link)
- [Issue time tracking](#issue-time-tracking)
- [Add worklog in Issue](#add-worklog-in-issue)
- [Edit worklog in Issue](#edit-worklog-in-issue)
- [Get Issue worklog](#get-issue-worklog)
- [Add watcher to Issue](#add-watcher-to-issue)
- [Send a notification to the recipients](#issue-notify)

### IssueLink

[](#issuelink)

- [Create Issue Link](#create-issue-link)
- [Get Issue LinkType](#get-issue-linktype)

### User

[](#user)

- [Create User](#create-user)
- [Get User Info](#get-user-info)
- [Find Users](#find-users)
- [Find Assignable Users](#find-assignable-users)
- [Delete User](#delete-user)

### Group

[](#group)

- [Create Group](#create-group)
- [Get Users from group](#get-users-from-group)
- [Add User to group](#add-user-to-group)

### Priority

[](#priority)

- [Get All Priority list](#get-all-priority-list)
- [Get Priority](#get-priority)

### Attachment

[](#attachment)

- [Get attachment Info](#get-attachment-info)
- [Remove attachment](#remove-attachment)

### Version

[](#version)

- [Create version](#create-version)
- [Update version](#update-version)
- [Delete version](#delete-version)
- [Get version related issues](#get-version-related-issues)
- [Get version unresolved issues](#get-version-related-issues)

#### Create Project

[](#create-project)

Create a new project.

[See Jira API reference](https://docs.atlassian.com/software/jira/docs/api/REST/latest/#api/2/project-createProject)

```
