PHPackages                             lesstif/jira-cloud-restapi - 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. lesstif/jira-cloud-restapi

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

lesstif/jira-cloud-restapi
==========================

JIRA Cloud REST API

1.11.1(4mo ago)481.0M—6.5%49[23 issues](https://github.com/lesstif/php-JiraCloud-RESTAPI/issues)3Apache-2.0PHPPHP ^8.1

Since Aug 13Pushed 1mo ago4 watchersCompare

[ Source](https://github.com/lesstif/php-JiraCloud-RESTAPI)[ Packagist](https://packagist.org/packages/lesstif/jira-cloud-restapi)[ RSS](/packages/lesstif-jira-cloud-restapi/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (10)Dependencies (8)Versions (40)Used By (3)

PHP JIRA Cloud REST-API
=======================

[](#php-jira-cloud-rest-api)

[![StyleCI](https://camo.githubusercontent.com/d9a476b5dc456296fd7c3c28584769ed66701ff0ed9cfbe0eeab3a69ec360525/68747470733a2f2f7374796c6563692e696f2f7265706f732f3532343131323134372f736869656c643f6272616e63683d6d61696e267374796c653d666c6174)](https://styleci.io/repos/524112147)[![Latest Stable Version](https://camo.githubusercontent.com/c3b94514e17be9166255f71d8325a15cbc0ae2dbdf2b3403f77dc34a10f68cd3/687474703a2f2f706f7365722e707567782e6f72672f6c6573737469662f6a6972612d636c6f75642d726573746170692f76)](https://packagist.org/packages/lesstif/jira-cloud-restapi)[![Latest Unstable Version](https://camo.githubusercontent.com/2231f6b41d12c85d42e3e83acc362614ec091ff1311b6e9b2d4b14f68bd47e1f/687474703a2f2f706f7365722e707567782e6f72672f6c6573737469662f6a6972612d636c6f75642d726573746170692f762f756e737461626c65)](https://packagist.org/packages/lesstif/jira-cloud-restapi)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/6558afb9c698ed15f4abd6e0a6c71513030ada97206ac0616f19dbc3c97b27ce/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6c6573737469662f7068702d4a697261436c6f75642d524553544150492f6261646765732f7175616c6974792d73636f72652e706e673f623d6d61696e)](https://scrutinizer-ci.com/g/lesstif/php-JiraCloud-RESTAPI/badges/quality-score.png?b=main)[![Total Downloads](https://camo.githubusercontent.com/8ce2f624b504fef627346a3a7b6209beeac58c4236607494f458b0c9e80113e4/687474703a2f2f706f7365722e707567782e6f72672f6c6573737469662f6a6972612d636c6f75642d726573746170692f646f776e6c6f616473)](https://packagist.org/packages/lesstif/jira-cloud-restapi)[![Monthly Downloads](https://camo.githubusercontent.com/20aa1ca38896b1146124111934b94eb8f8558266d74f6a3fbd63c9e2fd4b32dd/687474703a2f2f706f7365722e707567782e6f72672f6c6573737469662f6a6972612d636c6f75642d726573746170692f642f6d6f6e74686c79)](https://packagist.org/packages/lesstif/jira-cloud-restapi)[![Daily Downloads](https://camo.githubusercontent.com/62cf640458f0484820e357b4289b8ac7c9e14ce9f48a2b8179e3b372fd4b07c1/687474703a2f2f706f7365722e707567782e6f72672f6c6573737469662f6a6972612d636c6f75642d726573746170692f642f6461696c79)](https://packagist.org/packages/lesstif/jira-cloud-restapi)[![License](https://camo.githubusercontent.com/f2af7798dbd11ed83734b24829148d30b1ffc4321cd74cf6eedb9efee45a8af2/687474703a2f2f706f7365722e707567782e6f72672f6c6573737469662f6a6972612d636c6f75642d726573746170692f6c6963656e7365)](https://packagist.org/packages/lesstif/jira-cloud-restapi)[![PHP Version Require](https://camo.githubusercontent.com/6c0441981c4b4c3ae74a9528ac4925faeb18a7bae46daa2947ec21e047832903/687474703a2f2f706f7365722e707567782e6f72672f6c6573737469662f6a6972612d636c6f75642d726573746170692f726571756972652f706870)](https://packagist.org/packages/lesstif/jira-cloud-restapi)

Cloud only
==========

[](#cloud-only)

If you want to interact with Jira On-premise(Server or Data Center) instead of Cloud, [use this repository](https://github.com/lesstif/php-jira-rest-client).

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

[](#requirements)

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

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/jira-cloud-restapi:^1.0
    ```

    or add the following to your composer.json file.

    ```
    {
        "require": {
            "lesstif/jira-cloud-restapi": "^1.0"
        }
    }
    ```
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 `JiraCloud\JiraCloudApiServiceProvider` 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.

```
JIRAAPI_V3_HOST='https://your-jira.atlassian.net'
JIRAAPI_V3_USER='jira-username'
JIRAAPI_V3_PERSONAL_ACCESS_TOKEN='your-access-token-here'
## to enable session cookie authorization
# JIRAAPI_V3_COOKIE_AUTH_ENABLED=true
# JIRAAPI_V3_COOKIE_FILE=storage/jira-cookie.txt
## if you are behind a proxy, add proxy settings
JIRAAPI_V3_PROXY_SERVER='your-proxy-server'
JIRAAPI_V3_PROXY_PORT='proxy-port'
JIRAAPI_V3_PROXY_USER='proxy-username'
JIRAAPI_V3_PROXY_PASSWORD='proxy-password'
```

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

use array
---------

[](#use-array)

create Service class with ArrayConfiguration parameter.

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

$iss = new IssueService(new ArrayConfiguration(
          [
               'jiraHost' => 'https://your-jira.atlassian.net',
               'jiraUser' => 'jira-username',
               'personalAccessToken' => 'your-token-here',

                // custom log config
               'jiraLogEnabled' => true,
               'jiraLogFile' => "my-jira-rest-client.log",
               'jiraLogLevel' => 'INFO',

               // 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 Components](#get-project-components)
- [Get Project Type](#get-project-type)
- [Get Project Version](#get-project-version)
- [Get Project Roles](#get-project-roles)
- [Get Project Role](#get-project-role)

### 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)
- [Create Issue using REST API V3](#create-issue-using-rest-api-v3)
- [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)
    - [Simple Query with LinkedIssue](#simple-query-with-linkedissue)
    - [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)
- [Update User](#update-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://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-projects/#api-rest-api-3-project-post)

```
