Download the PHP package lesstif/jira-cloud-restapi without Composer
On this page you can find all versions of the php package lesstif/jira-cloud-restapi. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package jira-cloud-restapi
PHP JIRA Cloud REST-API
Cloud only
If you want to interact with Jira On-premise(Server or Data Center) instead of Cloud, use this repository.
Requirements
- PHP >= 8.1
- php JsonMapper
- phpdotenv
- adf-tools
Installation
-
Download and Install PHP Composer.
-
Next, run the Composer command to install the latest version of php jira rest client.
or add the following to your composer.json file.
-
Then run Composer's install or update commands to complete installation.
- After installing, you need to require Composer's autoloader:
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
you can choose loads environment variables either 'dotenv' or 'array'.
use dotenv
copy .env.example file to .env on your project root.
CAUTION this library not fully supported JIRA REST API V3 yet.
use array
create Service class with ArrayConfiguration parameter.
Usage
Table of Contents
Project
- Create Project
- Update Project
- Delete Project
- Get Project Info
- Get All Project list
- Get Project Components
- Get Project Type
- Get Project Version
Custom Field
- Get All Field list
- Create Custom Field
Issue
- Get Issue Info
- Create Issue
- Create Issue - bulk
- Create Sub Task
- Create Issue using REST API V3
- Add Attachment
- Update issue
- Update Labels
- Update Fix Versions
- Change assignee
- Remove issue
- Perform a transition on an issue
- Perform an advanced search, using the JQL
- Simple JQL
- Simple Query with LinkedIssue
- JQL With pagination
- Using JQL Query class
- Remote Issue Link
- Get Remote Issue Link
- Create Remote Issue Link
- Issue time tracking
- Add worklog in Issue
- Edit worklog in Issue
- Get Issue worklog
- Add watcher to Issue
- Remove watcher from Issue
- Send a notification to the recipients
Comment
- Add comment
- Get comment
- Delete comment
- Update comment
IssueLink
- Create Issue Link
- Get Issue LinkType
User
- Create User
- Get User Info
- Find Users
- Find Assignable Users
- Find Users by query
- Delete User
- Update User
Group
- Create Group
- Get Users from group
- Add User to group
- Remove User from group
Priority
- Get All Priority list
- Get Priority
Attachment
- Get attachment Info
- Remove attachment
Version
- Create version
- Update version
- Delete version
- Get version related issues
- Get version unresolved issues
Component
- Create component
- Update component
- Delete component
Board
- Get board list
- Get board info
- Get board issues
- Get board epics
Epic
- Get epic info
Create Project
Create a new project.
Update Project
Update a project. Only none null values sent in JSON will be updated in the project.
Values available for the assigneeType field are: 'PROJECT_LEAD' and 'UNASSIGNED'.
Delete Project
Deletes a project.
Get Project Info
Get All Project list
Get Project Components
See Jira API reference (Get project components)
Get Project type
See Jira API reference (get all types)
See Jira API reference (get type)
Get Project Version
get all project's versions.
or get paginated project's versions.
Get All Field List
Create Custom Field
If you need a list of custom field types(ex. com.atlassian.jira.plugin.system.customfieldtypes:grouppicker) , check out Get All Field list.
Get Issue Info
Returns a full representation of the issue for the given issue key.
You can access the custom field associated with issue through $issue->fields->customFields array or through direct custom field id variables(Ex: $issue->fields->customfield_10300).
Create Issue
All Jira v3 API users must use the Atlassian Document Format (ADF) for comment and description fields. It's represents rich text stored in Atlassian products, so very complicated.
For that reason, I used the amazing adf-tools create by DamienHarper.
If you want to set custom field, you can call the addCustomField function with custom field id and value as parameters.
Currently, not tested for all custom field types.
Create Multiple Issues
Create Sub Task
Creating a sub-task is similar to creating a regular issue, with two important method calls:
for example
Create Issue using REST API V3
REST API V3' description field is complicated.
If you want to set custom field, you can call the addCustomField function with custom field id and value as parameters.
Currently, not tested for all custom field types.
Add Attachment
Update issue
If you want to change the custom field type when updating an issue, you can call the addCustomField function just as you did for creating issue.
Update labels
This function is a convenient wrapper for add or remove label in the issue.
Update fix versions
This function is a convenient wrapper for add or remove fix version in the issue.
Change Assignee
REST API V3(JIRA Cloud) users must use changeAssigneeByAccountId method with accountId.
Remove Issue
Add comment
Not working at this time.!
Get comment
get comment by comment id
Delete comment
Update comment
Perform a transition on an issue
Note: this library uses goal status names instead of transition names.
So, if you want to change issue status to 'Some Status',
you should pass that status name to setTransitionName
i.e. $transition->setTransitionName('Some Status')
Note: If you are JIRA with local language profiles, you must use setUntranslatedName instead of setTransitionName.
i.e. $transition->setUntranslatedName('Done')
Perform an advanced search
Simple Query
Simple Query with LinkedIssue
JQL with pagination
JQL query class
If you're not familiar JQL then you can use convenience JqlQuery class.
JqlFunction class can be used to add jql functions calls to query.
You can find the names of almost all fields, functions, keywords and operators
defined as constants in JqlQuery
and static methods in JqlFunciton
classes.
For more info see the Jira docs (link above).
Remote Issue Link
get remote issue link
create remote issue link
Issue time tracking
This methods use get issue
and edit issue
methods internally.
See Jira API reference (get issue)
See Jira API reference (edit issue)
Add worklog in issue
edit worklog in issue
Get issue worklog
See Jira API reference (get full issue worklog)
See Jira API reference (get worklog by id)
Add watcher to Issue
Remove watcher from Issue
issue notify
Create Issue Link
The Link Issue Resource provides functionality to manage issue links.
Get Issue LinkType
Rest resource to retrieve a list of issue link types.
Create User
Create user. By default created user will not be notified with email. If password field is not set then password will be randomly generated.
Get User Info
Returns a user.
Find Users
Returns a list of users that match the search string and/or property.
Find Assignable Users
Returns a list of users that match the search string.
Find users by query
Returns a list of users that match the search string.
delete User
Removes user.
update User
Updates user.
Create Group
Create new group.
Get Users from group
returns a paginated list of users who are members of the specified group and its subgroups.
Add User to group
add user to given group.
Remove User from group
Removes given user from a group.
Get All Priority list
Get Priority
Get Attachment Info
Gets the attachment information and saves the attachment into the outDir directory.
Remove attachment
Create version
Update version
Delete version
Get version related issues
Get version unresolved issues
Create component
Update component
Delete component
Get board list
Get board info
Get board issues
Get board epics
Get epic info
Get epic issues
License
Apache V2 License
JIRA Rest API Documents
All versions of jira-cloud-restapi with dependencies
ext-curl Version *
ext-json Version *
netresearch/jsonmapper Version ^3.0|^4.0
monolog/monolog Version ^2.0|^3.0
vlucas/phpdotenv Version ^5.0|^6.0
damienharper/adf-tools Version ^1.0