Get api data and save to database

Hi all experienced Bubblers
I am using API plugin to get data from an Api
I want to get Rental availability
I have connected and calling the api, it returns with response, see attached screen


The response returns 5 item “to, from, available, closed and title”, But all comes with raw data. i am trying to figure out how to save the data in db ( i have created a data type availability with 5 fields to, from, available, closed and title) and show in the front end.

Thanks in advance
Sanjay

2 Likes

Looks like you already have the data in the db. Now you just have to link it to a repeating group on the front end.

He does, but can you explain how to me how to get it into the database

You can access data returned by your API connection in one of two ways, depending upon how you’ve set it up:

If you’ve configured your API call as “data”, you’ll see expressions in any expression builder field for “Get Data from an API…”. If you’ve configured your API call as an “action”, you’ll see a workflow action for pinging the API. That action’s returned data is available to downstream actions (such as Data actions like “make a new thing”, “make changes to a thing”, and Element > Set State actions) as “Results of step x’s blah-de-blah field” (where x is the step order of your API action in the workflow).

2 Likes

Hi. Looking for something similar here. How do I configure my API call as “Data”?

Here’s a video of what I’m trying to do: https://youtu.be/9KvUOhTQsiA

I would greatly appreciate any help and hope to pay it forward to someone else in the future.

Hi,

Works fine for me like that

Then

2019-08-09_14h44_02

Result

Hi @damien.laborie so how were you able to map your API values as inputs in your database? Do you have the parameters as fields in your database?

yes,
just ask for “Get Data from External API” :


then

attached a procedure (there is still some french on screen prints, nobody’s perfect :wink:
to explain, once you access data from API (or any other source), how to insert it into Bubble (create new thing).
NB: it works well but performance is poor and not reliable if you have hundreds of records

I learned that thanks to Gaby’s great tutos :

1 Like

@damien.laborie Merci. The guide is very helpful. I am trying now. I appreciate your help.

@damien.laborie

Hey !
Can you update that link ? I am huge interests at that kind of data manipulation and it would surely help…

Thanks

hello, please update the file with the link