Class: ReindexClient

ReindexClient(jiraClient)

new ReindexClient(jiraClient)

Used to access Jira REST endpoints in '/rest/api/2/reindex'

Parameters:
Name Type Description
jiraClient JiraClient
Source:

Methods

doReindex(opts, callbackopt) → {Promise}

Kicks off a reindex. Need Admin permissions to perform this reindex.

Parameters:
Name Type Attributes Description
opts

The request options sent to the Jira API.

Properties
Name Type Attributes Default Description
type string <optional>

Case insensitive String indicating type of reindex. If omitted, then defaults to BACKGROUND_PREFERRED

indexComments boolean <optional>
false

Indicates that comments should also be reindexed. Not relevant for foreground reindex, where comments are always reindexed.

indexChangeHistory boolean <optional>
false

Indicates that changeHistory should also be reindexed. Not relevant for foreground reindex, where changeHistory is always reindexed.

callback <optional>

Called when the reindex has been started.

Source:
Returns:

Resolved when the reindex has been started.

Type
Promise

getReindex(opts, callbackopt) → {Promise}

Gets information on the system reindexes. If a reindex is currently taking place then information about this reindex is returned. If there is no active index task, then returns information about the latest reindex task run, otherwise returns a 404 indicating that no reindex has taken place.

Parameters:
Name Type Attributes Description
opts

The request options sent to the Jira API.

Properties
Name Type Attributes Description
taskId <optional>

The id of an indexing task you wish to obtain details on. If omitted, then defaults to the standard behaviour and returns information on the active reindex task, or the last task to run if no reindex is taking place. . If there is no reindexing task with that id then a 404 is returned.

callback <optional>

Called when the reindex data has been retrieved.

Source:
Returns:

Resolved when the reindex data has been retrieved.

Type
Promise