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
/rest/gitplugin/2.0/reindex
NEW IN v4.17
/rest/gitplugin/1.0/index.json
) is deprecated starting GIJ v4.17.
For improved security, we recommend users to upgrade to v4.17.
method
POST
content-type
application/json
Parameters
Request body is a JSON structure.
Parameter | 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:
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:
http://jira.yourorg.com/rest/gitplugin/2.0/reindex
-----------------------
Response:
{
"success": true,
"finished": false,
"threadId": "18cc6873-2b75-45b3-ab86-a6b1d09f6c9f"
}
For GIJ 4.16 users and below
This section will be removed after January 1, 2024.
url
/rest/gitplugin/1.0/index
method
POST
content-type
multipart/form-data
Parameters
Request body is a multipart/form-data structure.
Parameter | Description |
---|---|
repoId | Form parameter.
This is the repository ID. Examples: |
Response
JSON
Example with repoId assigned:
http://jira.yourorg.com/rest/gitplugin/1.0/index
Body, (multipart/form-data):
repoId=133
-----------------------
Response:
{
"success":true,
"finished":true,
"threadId": xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
}
Reindex REST APIs
Reindex POST API (this page)