Workaround for returning data via API

Hi fellow Bubblers!

I’m trying to send my data from bubble app to a backend. My data is spread across multiple (30!) things, hence seperate get request of my things is not really an option. I’ve tried the workflow action “return data from API” but learned that there is a maximum of 50 items per thing that this request will return.

Has anyone figured out a way to surpass this?

Many thanks

Hey @deborah2 sounds complex!

You can format as a custom JSON object that’s returned. This can be much more than 50 items.

You’ll need to determine how the information from 30things needs to be structured to meet your requirements.

Good luck!

3 Likes

you can enable Data Api, and use a token generated in bubble editor, then using the get method can data enpoint of your entity in you backend to get the data.

use privacy rules to secure your data

Hey Jack, thanks for helping out!
I’m not sure if I fully understand your suggestion, an option for “formatted as” doesn’t come up here. Or do you mean to write out each block of code here, how can I then know which requirements bubble needs?

Hi Baloshi, thanks for your reply. To my knowledge, with this way you can only export one data thing at a time?

Hey @deborah2 So my understanding is that you need to allow for an external system to send a single request to your Bubble app and recieve some data back based across the 30 tables you have.

You’ll need to think about your requirements and how this should be structured in JSON and returned to your external system. :Format as text just allows you to do this over a list of items.

{
“Your data”:“data”
}

You can use the data api, but this would only be for one Type/table at a time.

1 Like

No, you can get a list of entire , ma’am, depending on how much privacy rules allow

@deborah2 Yes, using data api, you need to call each table and it will give the list of entries of related table. you need to call get for each table with an API-token generated within bubble editor or a user’s login token for bubble then you will get the data just like Do search give return data in app, if you use bubble generated token you will get all data, but if you use user login token, you will only get the data that user have access to.

and the Format text, issue is, you will use WorkUnit first in search your table and then returning that data, if workunit consumption is not your priority list, mean then you can use this, but it need to be structure well. ( i will also suggest , use buble generated token with this too, make the API workflwo run only authenticated , and can use bubble or user token )

and every time the backend workflwo call it will cost you workunit.