Sorry for my ignorance, but I’m trying to do a simple GET call to an API where my parameters are fed by text fields in my Bubble App page and I hit a submit button. I then simply want to show a part of the returned data on the same page after I submit. I feel like I want my API to do both the Action and Data piece but that doesn’t seem right since they both need one another to work from beginning to end? Anyway, just looking for a simple example I can follow that uses the API connector plugin, where the user puts in data in a text input field, they hit a button and feeds the data to a GET call and I then display some of the returning JSON or XML data back on the same page.
Thanks
Hey @jon5
Have you tried creating a group on your page where you would show the call’s response data?
You could run the following actions when the submit button is clicked:
- Step 1: GET call
- Step 2: Make changes to a Thing
- Step 3: Display data in Group data: Result of Step 2
Thanks @ambroisedlg for the response. I’m wondering if the issue is I need a paid plan to see all the options. Basically I don’t see how to initialize the GET call from the Button actions?
I think the API response is set to data not action? Ive seen this as a solution before
Two possible reasons why you can’t see a call in the Plugins section:
- it’s set as ‘Data’ instead of ‘Action’ as @edward.w.douglas noted
- it’s not initialized yet
I got a little closer…I think. I did convert to Action and then also added a ‘Display Data in Group’ to Workflow. I can get the button to click, send data and get results; but for the life of me I cannot get anything to show up in the group container. I have tried changing it to text and picking only one attribute of the result and tried keeping it as getSearchResult (API call name) and then feeding it the whole thing but every time the field is blank.
I’m trying with a simple Zillow Search lookup for this test. Below are more screenshots, if you see anything blaring that I’m missing, let me know.
Thank you both for taking the time to review and getting back to me. It’s much appreciated.
@jon5 your config seems correct but I’m not seeing any text elements in your Group to display the results? You need to set this text to Parent group’s field
You mean I have actually put in an object to display the data? LOL Oh geez, thank you SO much for helping me see what I was missing there…I’m now showing my result and can’t believe I forgot to put the actual element in the group! Thanks again!
Cool, glad it’s working!