App 1 (local development server) - search App 2 (live remote server) for a single record.
App 2 - return the result to App 1.
I understand this is done via server connect APIs which are considered webhooks by putting the LIVE url into the API Action of the app that is being searched. However, I am a bit lost as to the setup/config.
As you can see I have a search api that searches the DB, however it searches the local DB. I need it to search the remote DB.
Then, I have another request that should be used by the remote App to get the results from the above:
Im not sure if this is the right setup. Any nudge in the right direction would be greatly appreciated!
Okay i have it working but only when the search is done for multiple records, not single. This means my API call is fetching all the results. How do I filter only 1 that I need?
Assuming your app2 where the query is running is also a Wappler app, you can use “single query” step instead of regular “query” step to get just the first record.
To be honest, I did not completely grasp your setup here. You can connect multiple DB connections to same app, if DB is the only reason why you have to have a separate app.
Thanks Sid. How do I pass a query parameter (which I would normally use via form post or get) to use in the single query if I am executing that api from a different website ? So app 1 is querying the single db search in app B, but because app B is running the query there is no form request or get variable being passed on app B… it’s being “executed” by App A. And yes all Wappler apps…