Crocoblock / suggestions

The suggestions for CrocoBlock project
191 stars 78 forks source link

[FEATURE REQUEST] Rest API Endpoint to Database (Sync) #7494

Open mauro500designs opened 2 months ago

mauro500designs commented 2 months ago

Sometimes when using external endpoints, there are complications such as filters by queries, pagination, and some data not being available due to endpoint restrictions, etc.

What I'm proposing here is adding a new option to the JetEngine Endpoint API to save the current endpoint to the database and establish two ways of synchronization: manual sync and automated (cron) sync at specified intervals.

For example, for an endpoint named "Integration HR Portal," we could create a table named wp_jet_integration_hr_portal.

There should be a dropdown menu to select the INDEX field as the MAIN/UNIQUE field in the database. Then, actions and queries to retrieve data would be directly from our database instead of accessing the endpoint every time. Additionally, validation to check if the ID was updated or if a new one exists can be handled in the background with the cron job.

I think this approach would greatly enhance our ability to manipulate data from the endpoint as desired, rather than being limited by the endpoint.

mauro500designs commented 1 month ago

Examples on what I mentioned

Get API Data from the Endpoint

Screenshot 2024-05-10 at 8 31 41 PM

After selecting the fields (columns on the table), you can import and set as primary the ID of the endpoint manually.

Then a Table is created on the DB:

Screenshot 2024-05-10 at 8 34 19 PM

You can sync those every X minutes, days, weeks, etc and manually.

Then you can get all data from the Query Builder to fecthc and filter whatever ddata you have.