# Query only location snapshots

**URL:** <https://discuss.elastic.co/t/query-only-location-snapshots/164513>\
**Category:** Elasticsearch\
**Created:** [January 16, 2019, 5:13pm UTC](https://discuss.elastic.co/t/query-only-location-snapshots/164513 "2019-01-16T17:13:23Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ssolanoballester](https://avatars.discourse-cdn.com/v4/letter/s/41988e/32.png) [@ssolanoballester](https://discuss.elastic.co/u/ssolanoballester)\
**Post date:** [January 16, 2019, 5:13pm UTC](https://discuss.elastic.co/t/query-only-location-snapshots/164513/1 "2019-01-16T17:13:23Z")

</div>

How can I list only the location of all snapshots?

I tried:

curl -q -XPOST -H "Content-Type: application/json" -u elastic:mypassword "[https://10.0.0.1:9200/\_snapshot/\_all](https://10.0.0.1:9200/_snapshot/_all)" -d '{  
"\_source": ["location"],  
"query" : {  
"exists": {  
"field": "location"  
}  
}  
}'

and any other, but I didn't get results. Normally 400 error, or body problems.

---

<div class="post-metadata">

**Author:** ![ssolanoballester](https://avatars.discourse-cdn.com/v4/letter/s/41988e/32.png) [@ssolanoballester](https://discuss.elastic.co/u/ssolanoballester)\
**Post date:** [January 17, 2019, 5:30pm UTC](https://discuss.elastic.co/t/query-only-location-snapshots/164513/2 "2019-01-17T17:30:17Z")

</div>

OK I found something by myself.

curl -s -XGET -H "Content-Type: application/json" -u elastic:mypassword "[http://10.0.0.1:9200/\_snapshot/\_all](http://10.0.0.1:9200/_snapshot/_all)"|python -c 'import sys, json; print json.load(sys.stdin)["repositoryname"]["settings"]["location"]'

Thank to all visitors of this post 😉

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [February 14, 2019, 5:30pm UTC](https://discuss.elastic.co/t/query-only-location-snapshots/164513/3 "2019-02-14T17:30:20Z")

</div>

Closed on February 14, 2019, 5:30pm UTC

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