# Rest API filter using timestamp

**URL:** <https://community.f5.com/t/rest-api-filter-using-timestamp/71253>\
**Category:** Technical Forums\
**Tags:** devops, security\
**Created:** [December 20, 2022, 6:22am UTC](https://community.f5.com/t/rest-api-filter-using-timestamp/71253 "2022-12-20T06:22:35Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![srinidhi12](https://avatars.discourse-cdn.com/v4/letter/s/ecd19e/32.png) [@srinidhi12](https://community.f5.com/u/srinidhi12)\
**Post date:** [December 20, 2022, 6:22am UTC](https://community.f5.com/t/rest-api-filter-using-timestamp/71253/1 "2022-12-20T06:22:35Z")

</div>

Hi All,

I am trying to collect the F5 BIG-IP logs using rest API and using the below endpoint

[https://192.168.10.10/mgmt/tm/sys/log/audit/stats](https://192.168.10.10/mgmt/tm/sys/log/audit/stats)?options=range,2022-12-19T22:45:22Z

I want to **get the logs which are greater than specific timestamp** , is there any option to achieve it.

Also I am trying to do pagination but the response gives only the self link, and not the next link, is there any other option to do paging?

Thanks!

---

<div class="post-metadata">

**Author:** ![F5\_Design\_Engineer](https://d1p9zq3aats0t8.cloudfront.net/user_avatar/community.f5.com/f5_design_engineer/32/2479_2.png) [@F5\_Design\_Engineer](https://community.f5.com/u/F5_Design_Engineer)\
**Post date:** [December 21, 2022, 9:04am UTC](https://community.f5.com/t/rest-api-filter-using-timestamp/71253/2 "2022-12-21T09:04:41Z")

</div>

Hi&nbsp; @srinidhi12 &nbsp;,

To displays all log entries from the BIG-IP LTM logs, from a particular timestamp **2022-12-19T22:45:22Z** to the most recent&nbsp; add the keyword&nbsp; **--indefinite** to your rest api string. Like as follows:

[https://192.168.10.10/mgmt/tm/sys/log/audit/stats](https://192.168.10.10/mgmt/tm/sys/log/audit/stats)?options=range,2022-12-19T22:45:22Z **--indefinite**

**Note** : Same as specifying a single date.

**Note** : The requested logs contain all the log rotations for that log type&nbsp;that exist on the BIG-IP system. For example, BIG-IP LTM logs are combined from&nbsp; **/var/log/ltm** ,&nbsp; **/var/log/ltm.1** , and&nbsp;**/var/log/ltm[2-9].gz**, if those log rotations exist on the system. Additionally, when specifying&nbsp; **options=lines,10** , this means the first 10 lines of the oldest logs found for that log type.  
You can refer following kb article for more options:

## K41550738: Viewing BIG-IP log files using the iControl REST API

> **[myF5](https://my.f5.com/manage/s/article/K41550738)**

Kindly test and share your inputs if it works.

HTH

---

<div class="post-metadata">

**Author:** ![srinidhi12](https://avatars.discourse-cdn.com/v4/letter/s/ecd19e/32.png) [@srinidhi12](https://community.f5.com/u/srinidhi12)\
**Post date:** [December 22, 2022, 10:51am UTC](https://community.f5.com/t/rest-api-filter-using-timestamp/71253/3 "2022-12-22T10:51:20Z")

</div>

Hi&nbsp; @F5_Design_Engineer

Thanks for the details, I have tried this way and I was able to get the data from specific time stamp.

Also I wanted to get the data which is greater than the time, but **now I am getting the data which is greater than or equal to the timestamp.** Is there any way to get data which is **only greater than the specfic time**.

Thanks for the support!
