It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Call to API /rest/api/2/reindex/issue returns 404 error

I am getting an error 404 trying to use the reindex api. Please show me a JAVA example of the call.

POST /rest/api/2/reindex/issue

I have tried with ISSUE_ID from previous query......

jsonStr = "{\"issueId\": \"" + rs.getString("ISSUE_ID") + "\"}";
response = client.jiraConn.Post("/rest/api/latest/reindex/issue", jsonStr.getBytes(), headers);

and

/rest/api/latest/reindex/issue/" + rs.getString("ISSUE_ID")

Both return error 404

But the jira issue id does exist.

4 answers

1 accepted

0 votes
Answer accepted

I solved my problem.

http://My.Domain/jira/rest/api/latest/reindex/issue?issueId=339331

I forgot to put the /jira in front of the /rest/api/...

Thank you to everyone who tried to help me.

Robin

Hi @Robin Hochteil ,

 

It seems that you missed the host name of the URL, try http://jiradomain.com/rest/...

And replace jiradomain.com with domain and port where your Jira is running.

0 votes

Hello,

Try to use:

rest/api/2/reindex/issue

and issueId is a parameter and you send it as the payload. It should be like this

rest/api/2/reindex/issue?issueId=12342

Hi. Thank you for your response but I am using Java code not the URL line.

I have tried these 4 ways with a continuous 404 result

response = client.jiraConn.Post("/rest/api/2/reindex/issue/issueId:339331", "", headers);
response = client.jiraConn.Post("/rest/api/latest/reindex/issue", "{\"issueId\":\"339331\"}", headers);
response = client.jiraConn.Post("/rest/api/latest/reindex/issue", "{\"issueId\": \"CPQCS-5523\"}", headers);
response = client.jiraConn.Post("/rest/api/2/reindex/issue?issueId=339331", "", headers);

But you will have to tell your connection which server it should connect to. Do you do that somewhere?

http://My.Domain/rest/api/latest/reindex/issue?issueId=339331

 

<!DOCTYPE HTML PUBLIC '-//IETF//DTD HTML 2.0//EN'><html><head><title>404 Not Found</title></head><body><h1>Not Found</h1><p>The requested URL /rest/api/latest/reindex/issue was not found.</p></body></html>

Hi,

I am getting 404 for the below API. How do I fix it? I need this API to integrate with Japsersoft tool.


https://arterra.atlassian.net/rest/api/issues/?jql=project%20%3D%20%22CHAR%22%20AND%20component%20%3D%20Order_NotShipped

Thanks in Advance

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted in Jira

Demo Den Ep. 7: New Jira Cloud Reports

Learn how to use two new reports for next-gen projects in Jira Cloud:  Cumulative flow diagram and Sprint burndown chart. Ivan Teong, Product Manager, Jira Software, demos the Cumulative ...

229 views 1 2
Join discussion

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you