Api check if in database before adding

hi there

I’m a little bit confused, i have an Api that returns a list of items with and "id, brand, model, type & status. i want to check every week if the list of the API is still the same as in my database, if not i need to add the items that are missing and update the ones that are changed.

i had in mind too use a backend workflow, then make a workflow for the api and create a new thing only when the unique id is not in the database. then update all the things that are in the database but where the values are changed.

  1. how change i iterate through the values of the api and check if its in the database? i thought result of the api ->each items ID does not contain search for items in the database.

  2. how can i update the items that are in the database but that are changed?

What is the aim … to identify new IDs in the API?


i don’t not how to iterate through all the items of the API and the database.

Is there a date attached to the data that comes in through the API? You could cross-reference based on that and only query or update items with a date newer than what’s in your database.

1 Like

Iteration can be handled in different ways. What info in the API achieves your objective?

As @finitejest well suggests monitoring date changes may be it. But … is it what provides for what you are looking for?

This topic was automatically closed after 70 days. New replies are no longer allowed.