Elasticsearch snapshot query

Hi Team,

I was running the below command to get all the snapshots which was taken by me:

 curl -username:password  -X GET "ES Server IP:9200/_snapshot/reponame?v&s=id&pretty" -k

  "error" : {
    "root_cause" : [
        "type" : "illegal_argument_exception",
        "reason" : "request [/_snapshot/repo name] contains unrecognized parameters: [s], [v]"
    "type" : "illegal_argument_exception",
    "reason" : "request [/_snapshot/repo name] contains unrecognized parameters: [s], [v]"
  "status" : 400

But if I run the below command, I get response:

curl -u username:password -X GET "ES SERVER IP:9200/_snapshot/repo Name/_all" -k


Try with ES Server IP:9200/_snapshot/reponame?pretty instead.

This gives only Repo name and bucket settings not snapshot.

And what would you like to do? I mean where did you see that you can use "v&s=id" parameters?

I can't see that in the documentation.

Here ,https://www.elastic.co/guide/en/elasticsearch/reference/current/cat-snapshots.html

I missed the cat

curl -username:password  -X GET "ES Server IP:9200/_cat/_snapshot/reponame?v&s=id&pretty" -k

It same error with cat command as well.

This is incorrect. See the documentation. There is this example at the end.

GET /_cat/snapshots/repo1?v&s=id

So it should be:

curl -username:password  -X GET "ES Server IP:9200/_cat/snapshots/repo1?v&s=id"
Okie, so when I copy the command copy as curl it gives me 

curl -X GET "localhost:9200/_cat/snapshots/repo1?v&s=id&pretty"
The issue is with "&pretty".

Did I write pretty? I did not.

I meant it was issue with command from doc, so if you copy from(https://www.elastic.co/guide/en/elasticsearch/reference/current/cat-snapshots.html) it gives you an option "copy as curl" and if you do that you will get the command as below:

curl -X GET "localhost:9200/_cat/snapshots/repo1?v&s=id&pretty" and same when I ran encounter issue having "pretty ".

Thanks for reporting !

Would you like to open an issue about it?

That would be good to open an issue otherwise it will create the same problem for others as well, Could you guide me where to raise the case.

Thanks. Start here https://github.com/elastic/elasticsearch/issues/new?labels=>bug%2Cneeds%3Atriage&template=bug.md


This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.