Starts the reindex process in a separate thread and returns the result immediately.
- Jira administrators
- 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: |
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)