# EQL Search by timestamp

**URL:** <https://discuss.elastic.co/t/eql-search-by-timestamp/285474>\
**Category:** Elastic Security\
**Tags:** eql-elastic-query-language\
**Created:** [September 29, 2021, 12:49pm UTC](https://discuss.elastic.co/t/eql-search-by-timestamp/285474 "2021-09-29T12:49:42Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![GuillaumeBrun](https://avatars.discourse-cdn.com/v4/letter/g/76d3ee/32.png) [@GuillaumeBrun](https://discuss.elastic.co/u/GuillaumeBrun)\
**Post date:** [September 29, 2021, 12:49pm UTC](https://discuss.elastic.co/t/eql-search-by-timestamp/285474/1 "2021-09-29T12:49:42Z")

</div>

Hello,  
My problem is quite simple but I can't find the solution.  
I'm using Python to make GET calls on index using EQL.  
I would like to make this search only on the 5 past minutes logs. How can I do it ? Specify something in the URL ? In the query ?  
Here is my code :

```auto
header = {'Content-Type': 'application/json'}
data = '{"query": "sequence by host.name,source.ip with maxspan=15s [authentication where event.outcome == \\"failure\\"] by user.name \\n[authentication where event.outcome == \\"success\\"] by user.name \\n"}'
res = requests.get("http://localhost:9200/auditbeat*/_eql/search?pretty", headers=header, data=data, auth=auth, verify=False)

```

Thank you !

---

<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:** [October 27, 2021, 12:50pm UTC](https://discuss.elastic.co/t/eql-search-by-timestamp/285474/2 "2021-10-27T12:50:30Z")

</div>

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