Home Reference Source Repository
import JiraApi from 'jira-client/src/jira.js'
public class | source

JiraApi

Constructor Summary

Public Constructor
public

Member Summary

Public Members
public
public

base: *

public
public
public

host: *

public
public

port: *

public
public

request: *

public
public

Method Summary

Public Methods
public

addAttachmentOnIssue(issueId: string, readStream: object): *

Add attachment to a Issue Jira Doc

public

addComment(issueId: string, comment: string): *

Add a comment to an issue Jira Doc

public

addCommentAdvanced(issueId: string, comment: object): *

Add a comment to an issue, supports full comment object Jira Doc

public

addIssueToSprint(issueId: string, sprintId: string): *

Add an issue to the project's current sprint

public

addNewComponent(component: object): *

Add component to Jira Jira Doc

public

addNewIssue(issue: object): *

Add issue to Jira Jira Doc

public

addWatcher(issueKey: string, username: string): *

Add a user as a watcher on an issue

public

addWorklog(issueId: string, worklog: object, newEstimate: object, options: object): *

Add a worklog to a project Jira Doc

public

createBoard(boardBody: object): *

Create Board Jira Doc

public

Create custom Jira field Jira Doc

public

createFieldOption(fieldKey: string, option: object): *

Add an option for a select list issue field.

public

createProject(project: object): *

public

createRemoteLink(issueNumber: string, remoteLink: object): *

public

createUser(user: object): *

Create a Jira user Jira Doc

public

createVersion(version: object): *

Create a version Jira Doc

public

deleteAttachment(attachmentId: string): *

public

deleteBoard(boardId: string): *

Delete Board Jira Doc

public

deleteBoardProperty(boardId: string, propertyKey: string): *

Delete Board Property Jira Doc

public

deleteComment(issueId: string, commentId: number): *

public

deleteComponent(id: string, moveIssuesTo: string): *

Delete component from Jira Jira Doc

public

deleteFieldOption(fieldKey: string, optionId: string): *

Deletes an option from a select list issue field.

public

deleteIssue(issueId: string): *

Delete issue from Jira Jira Doc

public

deleteIssueLink(linkId: string): *

Deletes an issue link.

public

deleteRemoteLink(issueNumber: string, id: string): *

public

deleteVersion(versionId: string, moveFixIssuesToId: string, moveAffectedIssuesToId: string): *

Delete a version Jira Doc

public

deleteWebhook(webhookID: string): *

Delete a registered webhook Jira Doc

public

deleteWorklog(issueId: string, worklogId: string): *

Delete worklog from issue Jira Doc

public

async doRequest(requestOptions: object): *

public

downloadAttachment(attachment: object): *

public

estimateIssueForBoard(issueIdOrKey: string, boardId: number, body: string): *

Estimate issue for board Jira Doc

public

findIssue(issueNumber: string, expand: string, fields: string, properties: string, fieldsByKeys: boolean): *

public

async findRapidView(projectName: string): *

Find the Rapid View for a specified project

public

genericAgileGet(endpoint: string): *

Generic Get Request to the Agile API Jira Doc

public

genericGet(endpoint: string): *

Generic Get Request Jira Doc

public

getAllBoards(startAt: number, maxResults: number, type: string, name: string, projectKeyOrId: string): *

Get all boards Jira Doc

public

getAllSprints(boardId: string, startAt: number, maxResults: number, state: string): *

Get All Sprints Jira Doc

public

getAllVersions(boardId: string, startAt: number, maxResults: number, released: string): *

Get All Versions Jira Doc

public

getBacklogForRapidView(rapidViewId: string): *

Retrieve the backlog of a certain Rapid View

public

getBoard(boardId: string): *

Get Board Jira Doc

public

getBoardIssuesForEpic(boardId: string, epicId: string, startAt: number, maxResults: number, jql: string, validateQuery: boolean, fields: string): *

Get board issues for epic Jira Doc Jira Doc

public

getBoardIssuesForSprint(boardId: string, sprintId: string, startAt: number, maxResults: number, jql: string, validateQuery: boolean, fields: string, expand: string): *

Get Board issues for sprint Jira Doc

public

Get Board Properties Keys Jira Doc

public

getBoardProperty(boardId: string, propertyKey: string): *

Get Board Property Jira Doc

public

getComment(issueId: string, commentId: number): *

public

getComments(issueId: string): *

public

getConfiguration(boardId: string): *

Get Configuration Jira Doc

public

Describe the currently authenticated user Jira Doc

public

getDevStatusDetail(issueId: string, applicationType: string, dataType: string): *

Get a Dev-Status detail by issue ID

public

Get a Dev-Status summary by issue ID

public

getEpic(epicIdOrKey: string): *

Get Epic Jira Doc

public

getEpics(boardId: string, startAt: number, maxResults: number, done: string): *

Get Epics Jira Doc

public

getFieldOption(fieldKey: string, optionId: string): *

Returns an option for a select list issue field.

public

getFilter(filterId: string): *

Get Filter Jira Doc

public

getIssue(issueIdOrKey: string, fields: string, expand: string): *

Get issue Jira Doc

public

getIssueChangelog(issueNumber: string, startAt: integer, maxResults: integer): *

public
public

getIssueEstimationForBoard(issueIdOrKey: string, boardId: number): *

Get issue estimation for board Jira Doc

public

getIssueProperty(issueNumber: string, property: string): *

public

getIssueWatchers(issueNumber: string): *

public

getIssueWorklogs(issueId: string, startAt: integer, maxResults: integer): *

Get worklogs list from a given issue Jira Doc

public

getIssuesForBacklog(boardId: string, startAt: number, maxResults: number, jql: string, validateQuery: boolean, fields: string): *

Get issues for backlog Jira Doc

public

getIssuesForBoard(boardId: string, startAt: number, maxResults: number, jql: string, validateQuery: boolean, fields: string): *

Get issues for board Jira Doc

public

getIssuesForEpic(epicId: string, startAt: number, maxResults: number, jql: string, validateQuery: boolean, fields: string): *

Get issues for epic Jira Doc Jira Doc

public

async getLastSprintForRapidView(rapidViewId: string): *

Get the most recent sprint for a given rapidViewId

public

getProject(project: string): *

public

getProjects(boardId: string, startAt: number, maxResults: number): *

Get Projects Jira Doc

public

getProjectsFull(boardId: string): *

Get Projects Full Jira Doc

public

getRemoteLinks(issueNumber: string): *

Retrieves the remote links associated with the given issue.

public
public

getSprint(sprintId: string): *

Get details about a Sprint

public

getSprintIssues(rapidViewId: string, sprintId: string): *

Get the issues for a rapidView / sprint

public

async getUnresolvedIssueCount(version: string): *

public

getUser(accountId: string, expand: string): *

Returns a user.

public

getUsers(startAt: integer, maxResults: integer): *

Returns a list of all (active and inactive) users.

public

getUsersInGroup(groupname: string, startAt: integer, maxResults: integer): *

Get all users in group on Jira

public

getUsersIssues(username: string, open: boolean): *

Get issues related to a user Jira Doc

public

getVersion(version: string): *

Get details of single Version in project Jira Doc

public

getVersions(project: string): *

Get Versions for a project Jira Doc

public

getWebhook(webhookID: string): *

Get a webhook by its ID Jira Doc

public

getWorklogs(worklogsIDs: array, expand: string): *

Returns worklog details for a list of worklog IDs.

public

issueLink(link: object): *

Create an issue link between two issues

public

issueNotify(issueId: string, notificationBody: object): *

Notify people related to issue Jira Doc

public

listComponents(project: string): *

List Components Jira Doc

public

listFieldOptions(fieldKey: string): *

Returns all options defined for a select list issue field.

public

listFields(): *

List all fields custom and not that jira knows about.

public

List all issue link types jira knows about Jira Doc

public

List all Issue Types jira knows about Jira Doc

public

List all priorities jira knows about Jira Doc

public

List all Viewable Projects Jira Doc

public

listSprints(rapidViewId: string): *

Get a list of Sprints belonging to a Rapid View

public

listStatus(): *

Get list of possible statuses Jira Doc

public

listTransitions(issueId: string): *

List Transitions for a specific issue that are available to the current user Jira Doc

public

List all registered webhooks Jira Doc

public

makeAgileUri(object: UriOptions): *

public

makeRequestHeader(uri: string, options: object): {"rejectUnauthorized": *, "method": *, "uri": *, "json": boolean, ...options: Object}

public

makeSprintQueryUri(options: object): *

public

makeUri(options: object): *

public

makeWebhookUri(options: object): *

public

moveIssuesToEpic(epicIdOrKey: string, issues: array): *

Move Issues to Epic Jira Doc Jira Doc

public

moveToBacklog(issues: array): *

Move issues to backlog Jira Doc

public

moveVersion(versionId: string, position: string): *

Move version Jira Doc

public

partiallyUpdateEpic(epicIdOrKey: string, body: string): *

Partially update epic Jira Doc

public

rankEpics(epicIdOrKey: string, body: string): *

Rank Epics Jira Doc

public

rankIssues(body: string): *

Rank Issues Jira Doc

public

registerWebhook(webhook: object): *

Register a webhook Jira Doc

public

Get count of issues assigned to the component.

public

searchJira(searchString: string, optional: object): *

Pass a search query to Jira Jira Doc

public

Search user on Jira Jira Doc

public

setBoardProperty(boardId: string, propertyKey: string, body: string): *

Set Board Property Jira Doc

public

transitionIssue(issueId: string, issueTransition: object): *

Transition issue in Jira Jira Doc

public

updateAssignee(issueKey: string, assigneeName: string): *

Change an assignee on an issue Jira Doc

public

updateAssigneeWithId(issueKey: string, userId: string): *

Change an assignee on an issue Jira Doc

public

updateComment(issueId: string, commentId: string, comment: string, options: object): *

Update comment for an issue Jira Doc

public

updateComponent(componentId: string, component: object): *

Update Jira component Jira Doc

public

updateIssue(issueId: string, issueUpdate: object, query: object): *

Update issue in Jira Jira Doc

public

updateVersion(version: object): *

Update a version Jira Doc

public

updatedWorklogs(since: number, expand: string): *

Get ids of worklogs modified since Jira Doc

public

upsertFieldOption(fieldKey: string, optionId: string, option: object): *

Creates or updates an option for a select list issue field.

Public Constructors

public constructor(options: JiraApiOptions) source

Params:

NameTypeAttributeDescription
options JiraApiOptions

Public Members

public apiVersion: * source

public base: * source

public baseOptions: {} source

public greenhopperVersion: * source

public host: * source

public intermediatePath: * source

public port: * source

public protocol: * source

public request: * source

public strictSSL: * source

public webhookVersion: * source

Public Methods

public addAttachmentOnIssue(issueId: string, readStream: object): * source

Add attachment to a Issue Jira Doc

Params:

NameTypeAttributeDescription
issueId string

issue id

readStream object

readStream object from fs

Return:

*

public addComment(issueId: string, comment: string): * source

Add a comment to an issue Jira Doc

Params:

NameTypeAttributeDescription
issueId string

Issue to add a comment to

comment string

string containing comment

Return:

*

public addCommentAdvanced(issueId: string, comment: object): * source

Add a comment to an issue, supports full comment object Jira Doc

Params:

NameTypeAttributeDescription
issueId string

Issue to add a comment to

comment object

The object containing your comment data

Return:

*

public addIssueToSprint(issueId: string, sprintId: string): * source

Add an issue to the project's current sprint

Params:

NameTypeAttributeDescription
issueId string

the id of the existing issue

sprintId string

the id of the sprint to add it to

Return:

*

public addNewComponent(component: object): * source

Add component to Jira Jira Doc

Params:

NameTypeAttributeDescription
component object

Properly Formatted Component

Return:

*

public addNewIssue(issue: object): * source

Add issue to Jira Jira Doc

Params:

NameTypeAttributeDescription
issue object

Properly Formatted Issue object

Return:

*

public addWatcher(issueKey: string, username: string): * source

Add a user as a watcher on an issue

Params:

NameTypeAttributeDescription
issueKey string

the key of the existing issue

username string

the jira username to add as a watcher to the issue

Return:

*

public addWorklog(issueId: string, worklog: object, newEstimate: object, options: object): * source

Add a worklog to a project Jira Doc

Params:

NameTypeAttributeDescription
issueId string

Issue to add a worklog to

worklog object

worklog object from the rest API

newEstimate object

the new value for the remaining estimate field

options object
  • optional
  • default: {}

extra options

Return:

*

public createBoard(boardBody: object): * source

Create Board Jira Doc

Params:

NameTypeAttributeDescription
boardBody object

Board name, type and filter Id is required.

boardBody.type string

Valid values: scrum, kanban

boardBody.name string

Must be less than 255 characters.

boardBody.filterId string

Id of a filter that the user has permissions to view.

Return:

*

public createCustomField(field: object): * source

Create custom Jira field Jira Doc

Params:

NameTypeAttributeDescription
field object

Properly formatted Field object

Return:

*

public createFieldOption(fieldKey: string, option: object): * source

Add an option for a select list issue field. Jira Doc

Params:

NameTypeAttributeDescription
fieldKey string

the key of the select list field

option object

properly formatted Option object

Return:

*

public createProject(project: object): * source

Params:

NameTypeAttributeDescription
project object

with specs

Return:

*

Params:

NameTypeAttributeDescription
issueNumber string

The issue number to create the remotelink under

remoteLink object

the remotelink object as specified by the Jira API

Return:

*

public createUser(user: object): * source

Create a Jira user Jira Doc

Params:

NameTypeAttributeDescription
user object

Properly Formatted User object

Return:

*

public createVersion(version: object): * source

Create a version Jira Doc

Params:

NameTypeAttributeDescription
version object

an object of the new version

Return:

*

public deleteAttachment(attachmentId: string): * source

Params:

NameTypeAttributeDescription
attachmentId string

the attachment id

Return:

*

public deleteBoard(boardId: string): * source

Delete Board Jira Doc

Params:

NameTypeAttributeDescription
boardId string

Id of board to retrieve

Return:

*

public deleteBoardProperty(boardId: string, propertyKey: string): * source

Delete Board Property Jira Doc

Params:

NameTypeAttributeDescription
boardId string

Id of board to retrieve

propertyKey string

Id of property to delete

Return:

*

public deleteComment(issueId: string, commentId: number): * source

Params:

NameTypeAttributeDescription
issueId string

this issue this comment is on

commentId number

the id of the comment

Return:

*

public deleteComponent(id: string, moveIssuesTo: string): * source

Delete component from Jira Jira Doc

Params:

NameTypeAttributeDescription
id string

The ID of the component.

moveIssuesTo string

The ID of the component to replace the deleted component. If this value is null no replacement is made.

Return:

*

public deleteFieldOption(fieldKey: string, optionId: string): * source

Deletes an option from a select list issue field. Jira Doc

Params:

NameTypeAttributeDescription
fieldKey string

the key of the select list field

optionId string

the id of the deleted option

Return:

*

public deleteIssue(issueId: string): * source

Delete issue from Jira Jira Doc

Params:

NameTypeAttributeDescription
issueId string

the Id of the issue to delete

Return:

*

Deletes an issue link. Jira Doc

Params:

NameTypeAttributeDescription
linkId string

the Id of the issue link to delete

Return:

*

Params:

NameTypeAttributeDescription
issueNumber string

The issue number to delete the remotelink under

id string

the remotelink id

Return:

*

public deleteVersion(versionId: string, moveFixIssuesToId: string, moveAffectedIssuesToId: string): * source

Delete a version Jira Doc

Params:

NameTypeAttributeDescription
versionId string

the ID of the version to delete

moveFixIssuesToId string

when provided, existing fixVersions will be moved to this ID. Otherwise, the deleted version will be removed from all issue fixVersions.

moveAffectedIssuesToId string

when provided, existing affectedVersions will be moved to this ID. Otherwise, the deleted version will be removed from all issue affectedVersions.

Return:

*

public deleteWebhook(webhookID: string): * source

Delete a registered webhook Jira Doc

Params:

NameTypeAttributeDescription
webhookID string

id of the webhook to delete

Return:

*

public deleteWorklog(issueId: string, worklogId: string): * source

Delete worklog from issue Jira Doc

Params:

NameTypeAttributeDescription
issueId string

the Id of the issue to delete

worklogId string

the Id of the worklog in issue to delete

Return:

*

public async doRequest(requestOptions: object): * source

Params:

NameTypeAttributeDescription
requestOptions object

fields on this object get posted as a request header for requests to jira

Return:

*

public downloadAttachment(attachment: object): * source

Params:

NameTypeAttributeDescription
attachment object

the attachment

Return:

*

public estimateIssueForBoard(issueIdOrKey: string, boardId: number, body: string): * source

Estimate issue for board Jira Doc

Params:

NameTypeAttributeDescription
issueIdOrKey string

Id of issue

boardId number

The id of the board required to determine which field is used for estimation.

body string

value to set

Return:

*

public findIssue(issueNumber: string, expand: string, fields: string, properties: string, fieldsByKeys: boolean): * source

Params:

NameTypeAttributeDescription
issueNumber string

The issue number to search for including the project key

expand string

The resource expansion to return additional fields in the response

fields string

Comma separated list of field ids or keys to retrieve

properties string

Comma separated list of properties to retrieve

fieldsByKeys boolean

False by default, used to retrieve fields by key instead of id

Return:

*

public async findRapidView(projectName: string): * source

Find the Rapid View for a specified project

Params:

NameTypeAttributeDescription
projectName string

name for the project

Return:

*

public genericAgileGet(endpoint: string): * source

Generic Get Request to the Agile API Jira Doc

Params:

NameTypeAttributeDescription
endpoint string

Rest API endpoint

Return:

*

public genericGet(endpoint: string): * source

Generic Get Request Jira Doc

Params:

NameTypeAttributeDescription
endpoint string

Rest API endpoint

Return:

*

public getAllBoards(startAt: number, maxResults: number, type: string, name: string, projectKeyOrId: string): * source

Get all boards Jira Doc

Params:

NameTypeAttributeDescription
startAt number
  • optional
  • default: 0

The starting index of the returned boards.

maxResults number
  • optional
  • default: 50

The maximum number of boards to return per page.

type string
  • optional

Filters results to boards of the specified type.

name string
  • optional

Filters results to boards that match the specified name.

projectKeyOrId string
  • optional

Filters results to boards that are relevant to a project.

Return:

*

public getAllSprints(boardId: string, startAt: number, maxResults: number, state: string): * source

Get All Sprints Jira Doc

Params:

NameTypeAttributeDescription
boardId string

Id of board to retrieve

startAt number
  • optional
  • default: 0

The starting index of the returned sprints. Base index: 0.

maxResults number
  • optional
  • default: 50

The maximum number of sprints to return per page. Default: 50.

state string
  • optional

Filters results to sprints in specified states. Valid values: future, active, closed.

Return:

*

public getAllVersions(boardId: string, startAt: number, maxResults: number, released: string): * source

Get All Versions Jira Doc

Params:

NameTypeAttributeDescription
boardId string

Id of board to retrieve

startAt number
  • optional
  • default: 0

The starting index of the returned versions. Base index: 0.

maxResults number
  • optional
  • default: 50

The maximum number of versions to return per page. Default: 50.

released string
  • optional

Filters results to versions that are either released or unreleased.Valid values: true, false.

Return:

*

public getBacklogForRapidView(rapidViewId: string): * source

Retrieve the backlog of a certain Rapid View

Params:

NameTypeAttributeDescription
rapidViewId string

rapid view id

Return:

*

public getBoard(boardId: string): * source

Get Board Jira Doc

Params:

NameTypeAttributeDescription
boardId string

Id of board to retrieve

Return:

*

public getBoardIssuesForEpic(boardId: string, epicId: string, startAt: number, maxResults: number, jql: string, validateQuery: boolean, fields: string): * source

Get board issues for epic Jira Doc Jira Doc

Params:

NameTypeAttributeDescription
boardId string

Id of board to retrieve

epicId string

Id of epic to retrieve, specify 'none' to get issues without an epic.

startAt number
  • optional
  • default: 0

The starting index of the returned issues. Base index: 0.

maxResults number
  • optional
  • default: 50

The maximum number of issues to return per page. Default: 50.

jql string
  • optional

Filters results using a JQL query.

validateQuery boolean
  • optional

Specifies whether to validate the JQL query or not. Default: true.

fields string
  • optional

The list of fields to return for each issue.

Return:

*

public getBoardIssuesForSprint(boardId: string, sprintId: string, startAt: number, maxResults: number, jql: string, validateQuery: boolean, fields: string, expand: string): * source

Get Board issues for sprint Jira Doc

Params:

NameTypeAttributeDescription
boardId string

Id of board to retrieve

sprintId string

Id of sprint to retrieve

startAt number
  • optional
  • default: 0

The starting index of the returned issues. Base index: 0.

maxResults number
  • optional
  • default: 50

The maximum number of issues to return per page. Default: 50.

jql string
  • optional

Filters results using a JQL query.

validateQuery boolean
  • optional

Specifies whether to validate the JQL query or not. Default: true.

fields string
  • optional

The list of fields to return for each issue.

expand string
  • optional

A comma-separated list of the parameters to expand.

Return:

*

public getBoardPropertiesKeys(boardId: string): * source

Get Board Properties Keys Jira Doc

Params:

NameTypeAttributeDescription
boardId string

Id of board to retrieve

Return:

*

public getBoardProperty(boardId: string, propertyKey: string): * source

Get Board Property Jira Doc

Params:

NameTypeAttributeDescription
boardId string

Id of board to retrieve

propertyKey string

Id of property to retrieve

Return:

*

public getComment(issueId: string, commentId: number): * source

Params:

NameTypeAttributeDescription
issueId string

this issue this comment is on

commentId number

the id of the comment

Return:

*

public getComments(issueId: string): * source

Params:

NameTypeAttributeDescription
issueId string

this issue this comment is on

Return:

*

public getConfiguration(boardId: string): * source

Get Configuration Jira Doc

Params:

NameTypeAttributeDescription
boardId string

Id of board to retrieve

Return:

*

public getCurrentUser(): * source

Describe the currently authenticated user Jira Doc

Return:

*

public getDevStatusDetail(issueId: string, applicationType: string, dataType: string): * source

Get a Dev-Status detail by issue ID

Params:

NameTypeAttributeDescription
issueId string

id of issue to get

applicationType string

type of application (stash, bitbucket)

dataType string

info to return (repository, pullrequest)

Return:

*

public getDevStatusSummary(issueId: string): * source

Get a Dev-Status summary by issue ID

Params:

NameTypeAttributeDescription
issueId string

id of issue to get

Return:

*

public getEpic(epicIdOrKey: string): * source

Get Epic Jira Doc

Params:

NameTypeAttributeDescription
epicIdOrKey string

Id of epic to retrieve

Return:

*

public getEpics(boardId: string, startAt: number, maxResults: number, done: string): * source

Get Epics Jira Doc

Params:

NameTypeAttributeDescription
boardId string

Id of board to retrieve

startAt number
  • optional
  • default: 0

The starting index of the returned epics. Base index: 0.

maxResults number
  • optional
  • default: 50

The maximum number of epics to return per page. Default: 50.

done string
  • optional

Filters results to epics that are either done or not done. Valid values: true, false.

Return:

*

public getFieldOption(fieldKey: string, optionId: string): * source

Returns an option for a select list issue field. Jira Doc

Params:

NameTypeAttributeDescription
fieldKey string

the key of the select list field

optionId string

the id of the option

Return:

*

public getFilter(filterId: string): * source

Get Filter Jira Doc

Params:

NameTypeAttributeDescription
filterId string

Id of filter to retrieve

Return:

*

public getIssue(issueIdOrKey: string, fields: string, expand: string): * source

Get issue Jira Doc

Params:

NameTypeAttributeDescription
issueIdOrKey string

Id of issue

fields string
  • optional

The list of fields to return for each issue.

expand string
  • optional

A comma-separated list of the parameters to expand.

Return:

*

public getIssueChangelog(issueNumber: string, startAt: integer, maxResults: integer): * source

Params:

NameTypeAttributeDescription
issueNumber string

The issue number to search for including the project key

startAt integer
  • optional
  • default: 0

optional starting index number

maxResults integer
  • optional
  • default: 50

optional ending index number

Return:

*

public getIssueCreateMetadata(optional: object): * source

Params:

NameTypeAttributeDescription
optional object

object containing any of the following properties

optional.projectIds array
  • optional

: optional Array of project ids to return metadata for

optional.projectKeys array
  • optional

: optional Array of project keys to return metadata for

optional.issuetypeIds array
  • optional

: optional Array of issuetype ids to return metadata for

optional.issuetypeNames array
  • optional

: optional Array of issuetype names to return metadata for

optional.expand string
  • optional

: optional Include additional information about issue metadata. Valid value is 'projects.issuetypes.fields' Get metadata for creating an issue. Jira Doc

Return:

*

public getIssueEstimationForBoard(issueIdOrKey: string, boardId: number): * source

Get issue estimation for board Jira Doc

Params:

NameTypeAttributeDescription
issueIdOrKey string

Id of issue

boardId number

The id of the board required to determine which field is used for estimation.

Return:

*

public getIssueProperty(issueNumber: string, property: string): * source

Params:

NameTypeAttributeDescription
issueNumber string

The issue number to search for including the project key

property string

The property key to search for

Return:

*

public getIssueWatchers(issueNumber: string): * source

Params:

NameTypeAttributeDescription
issueNumber string

The issue number to search for including the project key

Return:

*

public getIssueWorklogs(issueId: string, startAt: integer, maxResults: integer): * source

Get worklogs list from a given issue Jira Doc

Params:

NameTypeAttributeDescription
issueId string

the Id of the issue to find worklogs for

startAt integer
  • optional
  • default: 0

optional starting index number

maxResults integer
  • optional
  • default: 1000

optional ending index number

Return:

*

public getIssuesForBacklog(boardId: string, startAt: number, maxResults: number, jql: string, validateQuery: boolean, fields: string): * source

Get issues for backlog Jira Doc

Params:

NameTypeAttributeDescription
boardId string

Id of board to retrieve

startAt number
  • optional
  • default: 0

The starting index of the returned issues. Base index: 0.

maxResults number
  • optional
  • default: 50

The maximum number of issues to return per page. Default: 50.

jql string
  • optional

Filters results using a JQL query.

validateQuery boolean
  • optional

Specifies whether to validate the JQL query or not. Default: true.

fields string
  • optional

The list of fields to return for each issue.

Return:

*

public getIssuesForBoard(boardId: string, startAt: number, maxResults: number, jql: string, validateQuery: boolean, fields: string): * source

Get issues for board Jira Doc

Params:

NameTypeAttributeDescription
boardId string

Id of board to retrieve

startAt number
  • optional
  • default: 0

The starting index of the returned issues. Base index: 0.

maxResults number
  • optional
  • default: 50

The maximum number of issues to return per page. Default: 50.

jql string
  • optional

Filters results using a JQL query.

validateQuery boolean
  • optional

Specifies whether to validate the JQL query or not. Default: true.

fields string
  • optional

The list of fields to return for each issue.

Return:

*

public getIssuesForEpic(epicId: string, startAt: number, maxResults: number, jql: string, validateQuery: boolean, fields: string): * source

Get issues for epic Jira Doc Jira Doc

Params:

NameTypeAttributeDescription
epicId string

Id of epic to retrieve, specify 'none' to get issues without an epic.

startAt number
  • optional
  • default: 0

The starting index of the returned issues. Base index: 0.

maxResults number
  • optional
  • default: 50

The maximum number of issues to return per page. Default: 50.

jql string
  • optional

Filters results using a JQL query.

validateQuery boolean
  • optional

Specifies whether to validate the JQL query or not. Default: true.

fields string
  • optional

The list of fields to return for each issue.

Return:

*

public async getLastSprintForRapidView(rapidViewId: string): * source

Get the most recent sprint for a given rapidViewId

Params:

NameTypeAttributeDescription
rapidViewId string

the id for the rapid view

Return:

*

public getProject(project: string): * source

Params:

NameTypeAttributeDescription
project string

key for the project

Return:

*

public getProjects(boardId: string, startAt: number, maxResults: number): * source

Get Projects Jira Doc

Params:

NameTypeAttributeDescription
boardId string

Id of board to retrieve

startAt number
  • optional
  • default: 0

The starting index of the returned projects. Base index: 0.

maxResults number
  • optional
  • default: 50

The maximum number of projects to return per page. Default: 50.

Return:

*

public getProjectsFull(boardId: string): * source

Get Projects Full Jira Doc

Params:

NameTypeAttributeDescription
boardId string

Id of board to retrieve

Return:

*

Retrieves the remote links associated with the given issue.

Params:

NameTypeAttributeDescription
issueNumber string

the issue number to find remote links for.

Return:

*

public getServerInfo(): * source

Return:

*

public getSprint(sprintId: string): * source

Get details about a Sprint

Params:

NameTypeAttributeDescription
sprintId string

the id for the sprint view

Return:

*

public getSprintIssues(rapidViewId: string, sprintId: string): * source

Get the issues for a rapidView / sprint

Params:

NameTypeAttributeDescription
rapidViewId string

the id for the rapid view

sprintId string

the id for the sprint

Return:

*

public async getUnresolvedIssueCount(version: string): * source

Params:

NameTypeAttributeDescription
version string

the version of your product you want to find the unresolved issues of.

Return:

*

public getUser(accountId: string, expand: string): * source

Returns a user. Jira Doc

Params:

NameTypeAttributeDescription
accountId string

The accountId of user to search for

expand string

The expand for additional info (groups,applicationRoles)

Return:

*

public getUsers(startAt: integer, maxResults: integer): * source

Returns a list of all (active and inactive) users. Jira Doc

Params:

NameTypeAttributeDescription
startAt integer
  • optional
  • default: 0

The index of the first user to return (0-based)

maxResults integer
  • optional
  • default: 50

The maximum number of users to return (defaults to 50).

Return:

*

public getUsersInGroup(groupname: string, startAt: integer, maxResults: integer): * source

Get all users in group on Jira

Params:

NameTypeAttributeDescription
groupname string

A query string used to search users in group

startAt integer
  • optional
  • default: 0

The index of the first user to return (0-based)

maxResults integer
  • optional
  • default: 50

The maximum number of users to return (defaults to 50).

Return:

*

public getUsersIssues(username: string, open: boolean): * source

Get issues related to a user Jira Doc

Params:

NameTypeAttributeDescription
username string

username of user to search for

open boolean

determines if only open issues should be returned

Return:

*

public getVersion(version: string): * source

Get details of single Version in project Jira Doc

Params:

NameTypeAttributeDescription
version string

The id of this version

Return:

*

public getVersions(project: string): * source

Get Versions for a project Jira Doc

Params:

NameTypeAttributeDescription
project string

A project key to get versions for

Return:

*

public getWebhook(webhookID: string): * source

Get a webhook by its ID Jira Doc

Params:

NameTypeAttributeDescription
webhookID string

id of webhook to get

Return:

*

public getWorklogs(worklogsIDs: array, expand: string): * source

Returns worklog details for a list of worklog IDs. Jira Doc

Params:

NameTypeAttributeDescription
worklogsIDs array

a list of worklog IDs.

expand string

expand to include additional information about worklogs

Return:

*

Create an issue link between two issues

Params:

NameTypeAttributeDescription
link object

a link object formatted how the Jira API specifies

Return:

*

public issueNotify(issueId: string, notificationBody: object): * source

Notify people related to issue Jira Doc

Params:

NameTypeAttributeDescription
issueId string

issue id

notificationBody object

properly formatted body

Return:

*

public listComponents(project: string): * source

List Components Jira Doc

Params:

NameTypeAttributeDescription
project string

key for the project

Return:

*

public listFieldOptions(fieldKey: string): * source

Returns all options defined for a select list issue field. Jira Doc

Params:

NameTypeAttributeDescription
fieldKey string

the key of the select list field

Return:

*

public listFields(): * source

List all fields custom and not that jira knows about. Jira Doc

Return:

*

public listIssueLinkTypes(): * source

List all issue link types jira knows about Jira Doc

Return:

*

public listIssueTypes(): * source

List all Issue Types jira knows about Jira Doc

Return:

*

public listPriorities(): * source

List all priorities jira knows about Jira Doc

Return:

*

public listProjects(): * source

List all Viewable Projects Jira Doc

Return:

*

public listSprints(rapidViewId: string): * source

Get a list of Sprints belonging to a Rapid View

Params:

NameTypeAttributeDescription
rapidViewId string

the id for the rapid view

Return:

*

public listStatus(): * source

Get list of possible statuses Jira Doc

Return:

*

public listTransitions(issueId: string): * source

List Transitions for a specific issue that are available to the current user Jira Doc

Params:

NameTypeAttributeDescription
issueId string

get transitions available for the issue

Return:

*

public listWebhooks(): * source

List all registered webhooks Jira Doc

Return:

*

public makeAgileUri(object: UriOptions): * source

Params:

NameTypeAttributeDescription
object UriOptions

Return:

*

public makeRequestHeader(uri: string, options: object): {"rejectUnauthorized": *, "method": *, "uri": *, "json": boolean, ...options: Object} source

Params:

NameTypeAttributeDescription
uri string
options object
  • optional

an object containing fields and formatting how the

Return:

{"rejectUnauthorized": *, "method": *, "uri": *, "json": boolean, ...options: Object}

public makeSprintQueryUri(options: object): * source

Params:

NameTypeAttributeDescription
options object
  • optional

The url after the /rest/

Return:

*

public makeUri(options: object): * source

Params:

NameTypeAttributeDescription
options object
  • optional

an object containing path information

Return:

*

public makeWebhookUri(options: object): * source

Params:

NameTypeAttributeDescription
options object
  • optional

An options object specifying uri information

Return:

*

public moveIssuesToEpic(epicIdOrKey: string, issues: array): * source

Move Issues to Epic Jira Doc Jira Doc

Params:

NameTypeAttributeDescription
epicIdOrKey string

Id of epic to move issue to, or 'none' to remove from epic

issues array

array of issues to move

Return:

*

public moveToBacklog(issues: array): * source

Move issues to backlog Jira Doc

Params:

NameTypeAttributeDescription
issues array

id or key of issues to get

Return:

*

public moveVersion(versionId: string, position: string): * source

Move version Jira Doc

Params:

NameTypeAttributeDescription
versionId string

the ID of the version to delete

position string

an object of the new position

Return:

*

public partiallyUpdateEpic(epicIdOrKey: string, body: string): * source

Partially update epic Jira Doc

Params:

NameTypeAttributeDescription
epicIdOrKey string

Id of epic to retrieve

body string

value to set, for objects make sure to stringify first

Return:

*

public rankEpics(epicIdOrKey: string, body: string): * source

Rank Epics Jira Doc

Params:

NameTypeAttributeDescription
epicIdOrKey string

Id of epic

body string

value to set

Return:

*

public rankIssues(body: string): * source

Rank Issues Jira Doc

Params:

NameTypeAttributeDescription
body string

value to set

Return:

*

public registerWebhook(webhook: object): * source

Register a webhook Jira Doc

Params:

NameTypeAttributeDescription
webhook object

properly formatted webhook

Return:

*

public relatedIssueCounts(id: string): * source

Get count of issues assigned to the component. Jira Doc

Params:

NameTypeAttributeDescription
id string

Component Id.

Return:

*

public searchJira(searchString: string, optional: object): * source

Pass a search query to Jira Jira Doc

Params:

NameTypeAttributeDescription
searchString string

jira query string in JQL

optional object

object containing any of the following properties

optional.startAt integer
  • optional
  • default: 0

: optional starting index number

optional.maxResults integer
  • optional
  • default: 50

: optional The maximum number of items to return per page. To manage page size, Jira may return fewer items per page where a large number of fields are requested.

optional.fields array
  • optional

: optional array of string names of desired fields

optional.expand array
  • optional

: optional array of string names of desired expand nodes

Return:

*

public searchUsers(options: SearchUserOptions): * source

Search user on Jira Jira Doc

Params:

NameTypeAttributeDescription
options SearchUserOptions

Return:

*

public setBoardProperty(boardId: string, propertyKey: string, body: string): * source

Set Board Property Jira Doc

Params:

NameTypeAttributeDescription
boardId string

Id of board to retrieve

propertyKey string

Id of property to delete

body string

value to set, for objects make sure to stringify first

Return:

*

public transitionIssue(issueId: string, issueTransition: object): * source

Transition issue in Jira Jira Doc

Params:

NameTypeAttributeDescription
issueId string

the Id of the issue to delete

issueTransition object

transition object from the jira rest API

Return:

*

public updateAssignee(issueKey: string, assigneeName: string): * source

Change an assignee on an issue Jira Doc

Params:

NameTypeAttributeDescription
issueKey string

the key of the existing issue

assigneeName string

the jira username to add as a new assignee to the issue

Return:

*

public updateAssigneeWithId(issueKey: string, userId: string): * source

Change an assignee on an issue Jira Doc

Params:

NameTypeAttributeDescription
issueKey string

the key of the existing issue

userId string

the jira username to add as a new assignee to the issue

Return:

*

public updateComment(issueId: string, commentId: string, comment: string, options: object): * source

Update comment for an issue Jira Doc

Params:

NameTypeAttributeDescription
issueId string

Issue with the comment

commentId string

Comment that is updated

comment string

string containing new comment

options object
  • optional
  • default: {}

extra options

Return:

*

public updateComponent(componentId: string, component: object): * source

Update Jira component Jira Doc

Params:

NameTypeAttributeDescription
componentId string

the Id of the component to update

component object

Properly Formatted Component

Return:

*

public updateIssue(issueId: string, issueUpdate: object, query: object): * source

Update issue in Jira Jira Doc

Params:

NameTypeAttributeDescription
issueId string

the Id of the issue to update

issueUpdate object

update Object as specified by the rest api

query object

adds parameters to the query string

Return:

*

public updateVersion(version: object): * source

Update a version Jira Doc

Params:

NameTypeAttributeDescription
version object

an new object of the version to update

Return:

*

public updatedWorklogs(since: number, expand: string): * source

Get ids of worklogs modified since Jira Doc

Params:

NameTypeAttributeDescription
since number

a date time in unix timestamp format since when updated worklogs will be returned.

expand string

ptional comma separated list of parameters to expand: properties (provides worklog properties).

Return:

*

public upsertFieldOption(fieldKey: string, optionId: string, option: object): * source

Creates or updates an option for a select list issue field. Jira Doc

Params:

NameTypeAttributeDescription
fieldKey string

the key of the select list field

optionId string

the id of the modified option

option object

properly formatted Option object

Return:

*