Forums

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

REST API Call: /rest/cluster/index-snapshot - 405 error

Darren Shinkins
Contributor
October 6, 2022 edited

Hi All,

Has anyone used this API call before?

https://docs.atlassian.com/software/jira/docs/api/REST/8.20.10/#cluster-requestCurrentIndexFromNode

 

If I've understood what this does correctly, it will copy an index from the specified source node to the node that this command gets run against.

I'm attempting this via a curl command, but I'm getting a 405 response, even though I do "have Jira Data Center"

 

the command I'm using is something like:

curl -k -X PUT -H "$myUsernameAndPwString" $jiraHostUrl/rest/cluster/index-snapshot/$NodeID

 

...where $NodeID is the jira.node.id from cluster.properties, of the node I want to take the index from.

 

Any idea where I could be going wrong at all?

 

Many thanks

1 answer

1 accepted

0 votes
Answer accepted
Darren Shinkins
Contributor
October 13, 2022

Figured it out!

Looks like it's a chance in the way the documentation lists out the methods.

It just needed to include "/rest/api/2" in the url, like:

 

$jiraHostUrl/rest/api/2/cluster/index-snapshot/$NodeID

 

That works for me. While the curl request returns nothing on the terminal, access logs show that a 200 response is returned, and the atlassian-jira.log file shows that a snapshot has been requested as expected.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
SERVER
VERSION
8.20.10
TAGS
AUG Leaders

Atlassian Community Events