Reindex Jira server using REST API via cURL command

Still need help?

The Atlassian Community is here for you.

Ask the community

There are various type of REST Client that can be use. In this example, REST request was triggered from Linux's Terminal:

To trigger indexing and locking the instance:

curl -u admin_username:admin_password -X POST $JIRAURL/rest/api/2/reindex?type=FOREGROUND

 To trigger indexing without setting the type:

curl -u admin_username:admin_password -X POST $JIRAURL/rest/api/2/reindex

(info) The default value for the type is BACKGROUND_PREFFERED

(info) For JIRA DC a better approach than background indexing is to take one node out of the cluster and run FOREGROUND reindexing. See  JRASERVER-66969 - Getting issue details... STATUS


Type of re-indexing available:

  • FOREGROUND - runs a lock/full reindexing
  • BACKGROUND - runs a background reindexing. If JIRA fails to finish the background reindexing, respond with 409 Conflict (error message).
  • BACKGROUND_PREFERRED  - If possible do a background reindexing. If it's not possible (due to an inconsistent index), do a foreground reindexing.
Last modified on Sep 25, 2019

Was this helpful?

Provide feedback about this article
Powered by Confluence and Scroll Viewport.