# Polling for query results

**URL:** <https://discuss.elastic.co/t/polling-for-query-results/121727>\
**Category:** Elasticsearch\
**Created:** [February 27, 2018, 7:51pm UTC](https://discuss.elastic.co/t/polling-for-query-results/121727 "2018-02-27T19:51:20Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![nemi](https://avatars.discourse-cdn.com/v4/letter/n/c6cbf5/32.png) [@nemi](https://discuss.elastic.co/u/nemi)\
**Post date:** [February 27, 2018, 7:51pm UTC](https://discuss.elastic.co/t/polling-for-query-results/121727/1 "2018-02-27T19:51:20Z")

</div>

Hi,

Is there a way or plan to provide an HTTP API to poll for results ? What I would like to do is :

1. Shoot a search query to ES and if the query is well defined get an HTTP 201 response code and some ID
2. Then poll ES using the ID to check if the query is done and if it is retrieve the result

I am 97% sure 🤔 there is no way to do this with the ES API but just in case I am asking.

The reason for this type of "Polling API" is that I need to run some queries that might take more than 5 minutes and I am running/shooting queries from AWS lambdas that have a 5 minute max policy (serverless crap can be painful).

Thanks.

---

<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:** [March 27, 2018, 7:51pm UTC](https://discuss.elastic.co/t/polling-for-query-results/121727/2 "2018-03-27T19:51:33Z")

</div>

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