Skip to main content

Searching Items by created_at time span

  • July 20, 2022
  • 7 replies
  • 798 views

Hello,

I am in the midst of API integration, i came across a doubt regarding the items. Is it possible to search for items in a board that have been created during the following day of from a timespan?

Thank you!

7 replies

Matias.Monday
Forum|alt.badge.img
  • monday.com Team Member
  • July 21, 2022

Hello @raimund.reisinger and welcome to the community!

I hope you like it here 💪

There are no arguments for that. But you could use the created_at field from the item to get the date of creation of each one and then sort them on your end.

Hope that helps 🙂

Cheers,
Matias


Thank you for the reply Matias.

However, is there any way I could only fetch the new or updated items so that i don’t have to request all the items every time i sync it with our Data Warehouse?

Thank you!


  • July 21, 2022

Hi @raimund.reisinger!

One way to achieve this would be to use the newest_first argument in your Items query. See argument list here.

This would get you the newest items. In order to prevent the query from pulling all your items, you can add the limit argument.


Thank you for the help @alessandra!

But even if i were to use the newest_first argument in my items query, how would I know that I have pulled all the latest ones and not have duplicates?

Thank you!


  • July 23, 2022

@raimund.reisinger

No problem!

One way to get around having duplicate values synced to your data warehouse would be to check query for the created_at field in your query. With this field, you can then exclude any items that have been created outside of the desired time period.

More on the created_at field can be found here: https://api.developer.monday.com/docs/items-queries#fields

I hope this helps! 🙂


@alessandra!

But wouldn’t that incur more processing and bandwidth from both ends?

Thanks


Matias.Monday
Forum|alt.badge.img
  • monday.com Team Member
  • July 25, 2022

Hello @raimund.reisinger!

If you want to query for the items that were created between two moments in time only, you will have to go with the solution that Alessandra provided. There is no argument in our API to filter the items by creation date when querying.

You can use pagination, get the created_at field from your items, and not return any more items once the desired date is shown in the created_at of the items in the response.

Hope that helps!

Cheers,
Matias