Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Jira Rest API reindex FOREGROUND working in BACKGROUND

Cyrille T.
December 4, 2018

Hello,

why (with Jira Core Server 7.1.4), when I use type = FOREGROUND

curl -D- -k -u <user>:<password> -X POST -H "Content-Type:application/json" -H "Accept:application/json" --data "{\"type\":\"FOREGROUND\"}" https://localhost:9004/rest/api/2/reindex

reindex working in BACKGROUND ?

{"progressUrl":"/secure/admin/jira/IndexProgress.jspa?taskId=36624"
,"currentProgress":0
,"type":"BACKGROUND"
,"submittedTime":"2018-12-04T21:03:12.248+0100"
,"success":false
}

In log :

image.png

Tank you by advance for your response.

1 answer

1 vote
Andy Heinzer
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Champions.
December 6, 2018

I don't think that the foreground / background option is meant to be passed as a data payload to that particular REST endpoint.  Instead this is something you can call as a request parameter in the URL endpoint itself.  Try adjusting your curl to look like this:

curl -D- -k -u <user>:<password> -X POST -H "Content-Type:application/json" -H "Accept:application/json" https://localhost:9004/rest/api/2/reindex?type=FOREGROUND

I hope this helps.

Andy

Cyrille T.
December 7, 2018

Thanks a lot, it looks like it works

{"progressUrl":"/secure/admin/jira/IndexProgress.jspa?taskId=37805"
,"currentProgress":0
,"type":"FOREGROUND"
,"submittedTime":"2018-12-07T13:25:40.787+0100"
,"success":false
}

Suggest an answer

Log in or Sign up to answer