# Filtering audit API to date ranges / pagination

**URL:** <https://connective.celigo.com/t/filtering-audit-api-to-date-ranges-pagination/587>\
**Category:** Integrator.io\
**Tags:** pagination, audit, filter, logs\
**Created:** [December 9, 2022, 7:39pm UTC](https://connective.celigo.com/t/filtering-audit-api-to-date-ranges-pagination/587 "2022-12-09T19:39:06Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![jeremynelson](https://avatars.discourse-cdn.com/v4/letter/j/7bcc69/32.png) [@jeremynelson](https://connective.celigo.com/u/jeremynelson)\
**Post date:** [December 9, 2022, 7:39pm UTC](https://connective.celigo.com/t/filtering-audit-api-to-date-ranges-pagination/587/1 "2022-12-09T19:39:06Z")

</div>

In the Audit API endpoints, there isn't much info on how I can filter the response in my request.

[https://docs.celigo.com/hc/en-us/articles/7708497540123-Audit-API-endpoints](https://docs.celigo.com/hc/en-us/articles/7708497540123-Audit-API-endpoints)

This informational page: [https://docs.celigo.com/hc/en-us/articles/6514515710107](https://docs.celigo.com/hc/en-us/articles/6514515710107) says that a max of 1000 records are produced by the API response. Given this I have a couple of questions.

- In the UI you can adjust the custom date field to get records for a given date range. Can I pass some parameters or headers to request only logs for a given date range via the various audit apis?
- If in the above example the date range I am interested in produces more than 1000 records, can I page through them to request more?

Thanks!

---

<div class="post-metadata">

**Author:** ![viliandyleonardo](https://avatars.discourse-cdn.com/v4/letter/v/839c29/32.png) [@viliandyleonardo](https://connective.celigo.com/u/viliandyleonardo)\
**Post date:** [December 9, 2022, 9:27pm UTC](https://connective.celigo.com/t/filtering-audit-api-to-date-ranges-pagination/587/2 "2022-12-09T21:27:36Z")

</div>

@jeremynelson [Updated on Dec 13th] We currently do support filtering the data from the API by dates (see The responses below) . The good news is that we are working on Audit log so that you are no longer bound by UI limitation (i.e can only see up to 1500 records at a time). This enhancement is targeted for our January 2023 release.

Also, we have a product portal that you can find out what features are bing planned or ideas that need input from our users. See image below how to get to our product portal and browse for ideas and vote...

 ![5301043caa20740200000001-27c5ca587ae8474aa3f1c85e7427ea95.png](https://us1.discourse-cdn.com/flex001/uploads/celigo/original/2X/b/b837e752038443880c5be4a6318bab0c4afe89a0.png)

---

<div class="post-metadata">

**Author:** ![jeremynelson](https://avatars.discourse-cdn.com/v4/letter/j/7bcc69/32.png) [@jeremynelson](https://connective.celigo.com/u/jeremynelson)\
**Post date:** [December 9, 2022, 9:40pm UTC](https://connective.celigo.com/t/filtering-audit-api-to-date-ranges-pagination/587/3 "2022-12-09T21:40:21Z")

</div>

Thanks for the response @viliandyleonardo Do I understand correctly that:

- Next year, the API response will contain entire resultset or at least a way to page through it?
- Requesting logs from the API created after a specific date will still not be possible so i'll have to parse the entire result set to get timestamps i'm interested in?

---

<div class="post-metadata">

**Author:** ![viliandyleonardo](https://avatars.discourse-cdn.com/v4/letter/v/839c29/32.png) [@viliandyleonardo](https://connective.celigo.com/u/viliandyleonardo)\
**Post date:** [December 9, 2022, 10:44pm UTC](https://connective.celigo.com/t/filtering-audit-api-to-date-ranges-pagination/587/4 "2022-12-09T22:44:29Z")

</div>

@jeremynelson

I will have the team in charge of this enhancement to review your follow up questions and respond.

Thanks

---

<div class="post-metadata">

**Author:** ![tylerlamparter](https://sea1.discourse-cdn.com/flex001/user_avatar/connective.celigo.com/tylerlamparter/32/9204_2.png) [@tylerlamparter](https://connective.celigo.com/u/tylerlamparter)\
**Post date:** [December 9, 2022, 11:15pm UTC](https://connective.celigo.com/t/filtering-audit-api-to-date-ranges-pagination/587/5 "2022-12-09T23:15:59Z")

</div>

@jeremynelson, it is possible to page through the audit endpoint. In the response header, there is a link to the next page. Now, I'm not aware of any current filter parameters, but have asked internally.

 ![5301043caa20740200000001-139dc5808bdd42eca4df5f4cb1a9d7fa.png](https://us1.discourse-cdn.com/flex001/uploads/celigo/original/2X/1/191f079936102e7db8ed2b9a0448c7e192fb8338.png)

 ![5301043caa20740200000001-bbd992ad6ebb4617a8a368b7978ee1cb.png](https://us1.discourse-cdn.com/flex001/uploads/celigo/original/2X/d/d67c528173716d22a8bdef5486b3fd8ab402f101.png)

---

<div class="post-metadata">

**Author:** ![jeremynelson](https://avatars.discourse-cdn.com/v4/letter/j/7bcc69/32.png) [@jeremynelson](https://connective.celigo.com/u/jeremynelson)\
**Post date:** [December 9, 2022, 11:27pm UTC](https://connective.celigo.com/t/filtering-audit-api-to-date-ranges-pagination/587/6 "2022-12-09T23:27:16Z")

</div>

When I look at the results I get from this

```
curl -H "Authorization: Bearer $token" https://api.integrator.io/v1/flows/$flow_id/audit
```

I only get a list of resource flow records like the below, with nothing else. There is no paging detail here.

```
  [{ "_id": "123434343", "resourceType": "flow", "_resourceId": "432434343", "source": "ui", "fieldChanges": [], "event": "create", "time": "2022-08-09T14:59:28.039Z", "byUser": { "_id": "343243fdfdsfd", "email": "user@domain.com", "name": "User Name" } }]
```

---

<div class="post-metadata">

**Author:** ![scotthenderson](https://sea1.discourse-cdn.com/flex001/user_avatar/connective.celigo.com/scotthenderson/32/6780_2.png) [@scotthenderson](https://connective.celigo.com/u/scotthenderson)\
**Post date:** [December 9, 2022, 11:28pm UTC](https://connective.celigo.com/t/filtering-audit-api-to-date-ranges-pagination/587/7 "2022-12-09T23:28:37Z")

</div>

It is in the HTTP response "headers".

---

<div class="post-metadata">

**Author:** ![jeremynelson](https://avatars.discourse-cdn.com/v4/letter/j/7bcc69/32.png) [@jeremynelson](https://connective.celigo.com/u/jeremynelson)\
**Post date:** [December 9, 2022, 11:41pm UTC](https://connective.celigo.com/t/filtering-audit-api-to-date-ranges-pagination/587/8 "2022-12-09T23:41:52Z")

</div>

Ah! ok thanks! I will now await if there is a way to grab specific dates. Thank you!

---

<div class="post-metadata">

**Author:** ![pridhvi](https://avatars.discourse-cdn.com/v4/letter/p/ed655f/32.png) [@pridhvi](https://connective.celigo.com/u/pridhvi)\
**Post date:** [December 13, 2022, 1:58pm UTC](https://connective.celigo.com/t/filtering-audit-api-to-date-ranges-pagination/587/9 "2022-12-13T13:58:34Z")

</div>

Hello @jeremynelson

- 
Yes, you can already apply date filters as parameters to API request to get the records for a specific date range, this is available now. 

- In January release, we will make user interface enhancement but not the APIs. The API response won't include all result; the api will still return 1000 records per request, and you need to paginate. 

I hope this information is helpful, please let me know if you have any further questions. I will be happy assist.

Thank you.

---

<div class="post-metadata">

**Author:** ![pridhvi](https://avatars.discourse-cdn.com/v4/letter/p/ed655f/32.png) [@pridhvi](https://connective.celigo.com/u/pridhvi)\
**Post date:** [December 13, 2022, 5:44pm UTC](https://connective.celigo.com/t/filtering-audit-api-to-date-ranges-pagination/587/10 "2022-12-13T17:44:25Z")

</div>

Hello @jeremynelson

Here is an example of how the request URI appears with a date filter added as a parameter.

Example: [https://api.integrator.io/v1/flows/\<\_id\>/audit?from=YYYY-MM-DD&to=YYYY-MM-DD](http://api.integrator.io/v1/flows/<_id>/audit?from=YYYY-MM-DD&to=YYYY-MM-DD)  
  
Note: \<\_id\> is the flow-id

Thank you.
