Skip to content

digitil/jira-rest-client

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

JIRA REST API Client

Greenkeeper badge

A Javascript client to the JIRA Cloud REST API

NPM

Installation

npm install jira-rest-client

Usage

To write an script using the client

  • Require 'jira-rest-client' in your file

    var JiraClient = require('jira-rest-client');
  • Create a client with your server url.

    var client = new JiraClient('https://jira.atlassian.com');
  • Invoke the rest api resource with required parameters.

    client.getPermissions().then(function(permissions) {
        console.log(permissions);
    });

Reference

https://docs.atlassian.com/jira/REST/cloud/

All the resources from the API Reference are transformed into a single API object.

For example, given a resource

api/2/application-properties
    Get property
    Set property via restful table
    Get advanced settings

You can expect methods

* client['application-properties'].getProperty()
* client['application-properties'].setPropertyViaRestfulTable()
* client['application-properties'].getAdvancedSettings()

Methods can accept the following positional parameters

* Object [routeParams] - expected IFF the resource has route parameters
* String [body] - expected IFF the resource method is PUT/POST
* Object requestOptions - always accepted.

See request documentation for available requestOptions.

All methods return a promise.

License

MIT: License

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published