Git Integration for Jira Self-Managed (Data Center/Server) Documentation

Contact Support
GitKraken Status  

Reindex POST API

Starts the reindex process in a separate thread and returns the result immediately.

There are two types of users who can perform the Reindex POST API call:

  1. Jira administrators
  2. Jira user who has all of the following:
    • View/browse permissions to the project;
    • View Development Tools permissions to the same project; and
    • The repository is associated to the project.

 

url

{JiraBaseURL}/rest/gitplugin/2.0/reindex NEW IN v4.17

method

POST

content-type

application/json

Parameters

Request body is a JSON structure.

Field Description
repoId Integer. Optional.

If repoId is left as blank, the API will perform a reindex of all repositories.

priority Integer. Optional.

Set the priority of the operation. Default value is 24. Any value greater or equal to 1 is allowed.

The tasks in the queue are executed in descending order of priority. The Git Integration for Jira app internally uses the following priorities for operations:
24 — Manual reindex
22 — Webhook reindex
20 — Scheduled reindex
10 — Remove repository
  2 — Git GC

Response

JSON

Example with repoId assigned:

Reindex the repository with repoId.

http://jira.yourorg.com/rest/gitplugin/2.0/reindex

Body, JSON(application/json):
{
  "repoId": 133
}

-----------------------

Response:
{
  "success": true,
  "finished": false,
  "threadId": "c3989477-053b-4cb7-965c-1ab54690490f"
}

Example with priority assigned:

http://jira.yourorg.com/rest/gitplugin/2.0/reindex

Body, JSON(application/json):
{
  "repoId": 133,
  "priority": 20
}

-----------------------

Response:
{
  "success": true,
  "finished": false,
  "threadId": "c3989477-053b-4cb7-965c-1ab54690490f"
}

Example with blank repoId:

With blank repoId, the example below will perform a full reindex.

http://jira.yourorg.com/rest/gitplugin/2.0/reindex

-----------------------

Response:
{
  "success": true,
  "finished": false,
  "threadId": "18cc6873-2b75-45b3-ab86-a6b1d09f6c9f"
}

Example with Webhook URL from the GIJ webhooks page:

Reindex a repository which contains the webhook setting.

http://jira.yourorg.com/rest/gitplugin/webhook/1.0/reindex/<secret_key>

-----------------------

Response:
{
  "success": true,
  "finished": false,
  "threadId": "18cc6873-2b75-45b3-ab86-a6b1d09f6c9f"
}

 


Reindex REST APIs

Reindex POST API (this page)

Reindex GET API

Have feedback about this article? Did we miss something? Let us know!
On this page