Package Exports
- jira.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (jira.js) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
JavaScript JIRA API Client
A JavaScript wrapper for the JIRA REST API
Installation
Install with the npm:
$ npm install jira.js
Install with the yarn:
$ yarn add jira.js
Examples
Create the JIRA client
// ES5
var { Client } = require("jira.js");
// ES6
import { Client } from "jira.js";
// Initialize
var client = new Client({
host: "https://jira.somehost.com"
});
Get all projects
// ES5/ES6
client.projects
.getAllProjects()
.then(projects => console.log(projects))
.catch(error => console.log(error));
// ES7
async function getProjects() {
const projects = await client.projects.getAllProjects();
console.log(projects);
return projects;
}
Authorization
Basic authorization
const client = new Client({
host: "https://jira.somehost.com",
authentication: {
basic: {
username: "MyUsername",
apiToken: "My Password or API Token"
}
}
});
JWT authentication
const client = new Client({
host: 'https://jira.somehost.com',
authentication: {
jwt: {
iss: 'id';
secret: 'secret key';
}
}
});
OAuth2.0 authentication
const client = new Client({
host: "https://jira.somehost.com",
authentication: {
accessToken: "my access token"
}
});
Documentation
Can't find what you need in the readme? Check out our documentation here: https://mrrefactoring.github.io/jira.js/
Road map
- Response models
- Method names reducing
Changelog
1.4.0
- FEATURE: Now that all parameters are optional, there is no need to pass an empty object
- FEATURE:
dashboards.createDashboard
was added - FEATURE:
dashboards.updateDashboard
was added - FEATURE:
dashboards.deleteDashboard
was added - FEATURE:
dashboards.copyDashboard
was added - FEATURE:
screens.getIssueTypeScreenSchemesForProjects
was added - FEATURE:
issueFieldConfigurations.getAllFieldConfiguration
was added - FEATURE:
issueFieldConfigurations.getFieldConfigurationItems
was added - FEATURE:
issueFieldConfigurations.getFieldConfigurationIssueTypeItems
was added - FEATURE: In
issues.getTransitions
was addedincludeUnavailableTransitions
property - DEPRECATION:
issueFields.getFieldConfigurationItems
are deprecated (Removed from official API, useissueFieldConfigurations.getFieldConfigurationItems
). Will be removed in next major version
1.3.0
- FEATURE:
jiraExpressions.analyseJiraExpression
was added - FEATURE:
screens.getIssueTypeScreenSchemeItems
was added - FEATURE: In
projects.getProjectsPaginated
was addedstatus
property - FEATURE: In
projects.deleteProject
was addedenableUndo
property - DEPRECATION:
timeTracking.disableTimeTracking
are deprecated (Removed from official API). Will be removed in next major version
1.2.0
- FEATURE:
issueFields.getAllFieldConfigurations
added as experimental - FEATURE:
issueFields.getFieldConfigurationItems
added as experimental - IMPROVEMENT: dependencies update
1.1.1
- FIX:
strictGDPR
feature fixed - FIX:
Cannot read property 'Authorization' of undefined
fixed
1.1.0
- FEATURE:
strictGDPR
property added to Config. Allows use only GDPR-compliant functionality - FEATURE:
users.getAllUsersDefault
added - FEATURE:
issueCustomFieldOptions.updateCustomFieldOptions
added as experimental - DEPRECATION:
projectRoleActors.getActorsCountForProjectRole
are deprecated (Removed from official API). Will be removed in next major version
1.0.3
- DEPRECATION:
permissionsSchemes
andissueAttachment
are deprecated - IMPROVEMENT: agile api typings improved
- IMPROVEMENT: dependencies update
- FIX: Authorization parameter excluded for agile API in the request body
1.0.2
- FIX: JWT Authentication default expire time added
- IMPROVEMENT: modified
atlassian-jwt
(removed lodash from dependencies, bundle size decreased) - IMPROVEMENT: small tests for authentication added
1.0.1
- FIX: documentation link fixed
1.0.0
- RELEASE