This is something you can do on the backend workflows. In my opinion, this is a little advanced for Bubble beginners.
Currently, the only way to get the ‘return data from API’ to actually send you this data, you will need to use the API connector. Bubble is potentially working on allowing us to use the ‘Schedule API Workflow’ to do this in the future.
So when you set this up with the API connector, then you can call it from the front end and only get the data you are requesting through the API Connection. Bubble is also working on only sending data to the page that it needs. If they do that, then we won’t even need to do this process.
Does any of that make sense? Let me know if you have any other questions.
The goal with this approach was to test the impact of reducing the total amount of data returned to the page and to combine two data types into a new ‘synthetic’ data type to reduce the searches I was having to do on the page.
To do this, I’m using the return data action to write the json for a ‘data type’ that my page can then consume and display. This works by calling that endpoint using the API connector.
In general, the approach is to run a search for the data you need and then use :formatted as text to write the json structure of each record being returned. If you’re new to writing something like this, I’d recommend using an online JSON validator to write the static structure first and make sure it’s valid. Then, copy paste that into Bubble and replace the static values with dynamic values.