Elastic Search API queries for index logs

We are using EFK as log management for our application. I am playing with API of elastic search, while doing this I have few queries to get clarify.

localhost:9200/_cat/indices?bytes=b&s=store.size:desc&v
getting output with index with storage values.

health status index uuid pri rep docs.count docs.deleted store.size pri.store.size
green open logstash-2020.03.12 fzXE4jkNRVuR1vY8gsH1Wg 5 1 5238124 0 4338693519 2166930857
green open logstash-2020.06.18 ZceKU56oR8KyeGi3KnkvnQ 5 1 1271373 0 1697783610 846840406
green open logstash-2020.06.14 eRaq5zD1SjC8hK4XaxzQ0Q 5 1 1827761 0 1587567406 793896413
green open logstash-2020.06.17 oKwkLkO_S_ePoQGQw4wZRQ 5 1 1087704 0 1400759550 700349818

How extract the each index?
**I am using with curl request below **
localhost:9200/logstash-2020.06.14/_search

But i am not able to getting the full data which it is actually stored in index "logstash-2020.06.14",

Is there any way to GET the index data?

By default you will get only 10 documents
you can supply size parameter to retrieve more
localhost:9200/logstash-2020.06.14/_search?size=100

1 Like

@ylasri Thanks for your response.
Now understand to get this data, kindly share any links if you have any for more optimization with dates or size i can use it API and also for my research.

Check these link that may help :
pagination
scoll

1 Like

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