PHPackages                             mironoff/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. mironoff/php-jira-rest-client

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

mironoff/php-jira-rest-client
=============================

JIRA REST API Client for PHP Users.

2.2.2(6y ago)15.0kApache-2.0PHPPHP ^7.1

Since Feb 3Pushed 6y agoCompare

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

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

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

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

[![Latest Stable Version](https://camo.githubusercontent.com/a5d2fb300525cc8552de39e933da5426c72a3b01c4e15ca352bfa4864bd79696/68747470733a2f2f706f7365722e707567782e6f72672f6d69726f6e6f66662f7068702d6a6972612d726573742d636c69656e742f762f737461626c65)](https://packagist.org/packages/mironoff/php-jira-rest-client)[![Latest Unstable Version](https://camo.githubusercontent.com/fb7a0c1216bbb961486de7db74527d34d29c37284a97e710c73e5f2e04cbef3e/68747470733a2f2f706f7365722e707567782e6f72672f6d69726f6e6f66662f7068702d6a6972612d726573742d636c69656e742f762f756e737461626c65)](https://packagist.org/packages/mironoff/php-jira-rest-client)[![Build Status](https://camo.githubusercontent.com/27789a8ddaa9e7bf34367d894ece356810c80cc22b938dddb756bf73ed6d7cab/68747470733a2f2f7472617669732d63692e6f72672f6d69726f6e6f66662f7068702d6a6972612d726573742d636c69656e742e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/mironoff/php-jira-rest-client)[![StyleCI](https://camo.githubusercontent.com/6e4c04d11a4567e3273877842a2bdb8663948eb7b2faec574840ba35dbcf740d/68747470733a2f2f7374796c6563692e696f2f7265706f732f33303031353336392f736869656c643f6272616e63683d6d6173746572267374796c653d666c6174)](https://styleci.io/repos/30015369)[![Scrutinizer](https://camo.githubusercontent.com/14675c7c432526e6bb8519066f0da1b07e6c35eb5ab44eb97d82a92b3c1ae3b4/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f6d69726f6e6f66662f7068702d6a6972612d726573742d636c69656e742f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/mironoff/php-jira-rest-client/)[![Coverage Status](https://camo.githubusercontent.com/a6ddf26349eabc377ac20ad76f89ce51506fb8f669d174e2089914eb65b063cf/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6769746875622f6d69726f6e6f66662f7068702d6a6972612d726573742d636c69656e742f62616467652e7376673f6272616e63683d6d6173746572)](https://coveralls.io/github/mironoff/php-jira-rest-client?branch=master)[![License](https://camo.githubusercontent.com/ac852e1593efa817768bb3c1ea52ae722e1b592268830952324e0d7c73bdd17c/68747470733a2f2f706f7365722e707567782e6f72672f6d69726f6e6f66662f7068702d6a6972612d726573742d636c69656e742f6c6963656e7365)](https://packagist.org/packages/mironoff/php-jira-rest-client)[![Total Downloads](https://camo.githubusercontent.com/d810dc54bebc584908a23d474c4b6d3fe54a416405d6deb29f47ba9495170f21/68747470733a2f2f706f7365722e707567782e6f72672f6d69726f6e6f66662f7068702d6a6972612d726573742d636c69656e742f646f776e6c6f616473)](https://packagist.org/packages/mironoff/php-jira-rest-client)[![Monthly Downloads](https://camo.githubusercontent.com/823e502e7b0b45e51615f51018cf8ad8e1f5728d1f4529d5876ef1cf0971cc94/68747470733a2f2f706f7365722e707567782e6f72672f6d69726f6e6f66662f7068702d6a6972612d726573742d636c69656e742f642f6d6f6e74686c79)](https://packagist.org/packages/mironoff/php-jira-rest-client)[![Daily Downloads](https://camo.githubusercontent.com/60556db0d1d5804e3c26cd4584fff811159afcfca400a63a11981eb89adb6208/68747470733a2f2f706f7365722e707567782e6f72672f6d69726f6e6f66662f7068702d6a6972612d726573742d636c69656e742f642f6461696c79)](https://packagist.org/packages/mironoff/php-jira-rest-client)

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

[](#requirements)

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

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 mironoff/php-jira-rest-client
    ```

    or add the following to your composer.json file.

    ```
    {
        "require": {
            "mironoff/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"
JIRA_REST_API_V3=false
```

**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.

**REST API V3 Note:**In accordance to the [Atlassian's deprecation notice](https://developer.atlassian.com/cloud/jira/platform/deprecation-notice-user-privacy-api-migration-guide/), After the 29th of april 2019, REST API no longer supported username and userKey, and instead use the account ID. if you are JIRA Cloud users, you need to set *JIRA\_REST\_API\_V3=true* in the .env file.

**CAUTION**this library not fully supported JIRA REST API V3 yet.

use array
---------

[](#use-array)

create Service class with ArrayConfiguration parameter.

```
use mironoff\JiraRestApi\Configuration\ArrayConfiguration;
use mironoff\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)
- [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)
- [Remove watcher from Issue](#remove-watcher-from-issue)
- [Send a notification to the recipients](#issue-notify)

### Comment

[](#comment)

- [Add comment](#add-comment)
- [Get comment](#get-comment)
- [Delete comment](#delete-comment)
- [Update comment](#update-comment)

### 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)
- [Find Users by query](#find-users-by-query)
- [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)
- [Remove User from group](#remove-user-from-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)

### Component

[](#component)

- [Create component](#create-component)
- [Update component](#update-component)
- [Delete component](#delete-component)

### Board

[](#board)

- [Get board list](#get-board-list)
- [Get board info](#get-board-info)
- [Get board issues](#get-board-issues)
- [Get board epics](#get-board-epics)

### Epic

[](#epic)

- [Get epic info](#)

#### 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)

```
