I am trying to setup an API call with dynamic data.
The call works when initially initializing the call.
The problem is when I use dynamic data for it, and I go to test is in preview for Bubble, nothing is being sent to the API, I’m not getting a response on my end.
Not even an error, literally no interaction to the API I’m using is happening.
Why? The image URL’s are there as you can see in the debugger.
The API call is formatted as JSON body type in the api connecter plugin.
Is it not supposed to just fill in the slot for with the URL’s? This makes no sense to me, because it should still be sending something to the API key I’m using, but it’s not even getting a call.
Ok, that’s even easier. But right now you have it formatted like this
“images”: [https://;lasjd;lfkjas;ldkjfasjdf;ljasdrpowueproupouasdf;lj;j.png,;lasjd;flkjas;ldkjfa;lsjd;fljapowiuerpoiuqwper.png,paosdjfpaosd;flkjasl;dkjf;laksjdf;lj;ljqpwoieur.png] which contains 0 quotation marks
So you’d need to use “format as text” on a Search for Dreambooth Training Image’s
So it might look like Search for Dreambooth Training Image’s:format as text
then inside format as text you’ll have it
“This image’s image(or file, or text, or wherever the url can be found)”
The way it is set up right now is the Dreambooth Training Images is a multi-file uploader, so all ten images are getting uploaded using that. Dreambooth Training Images is just the name of the Multi-file uploader element.
The value is all the ten image URL’s from the upload.
There’s not any option for :format as text here.
I added quotes manually, shown in screenshot, but it puts the whole thing in quotation marks, and doesn’t separate between each comma (aka each separate link).
When using the API Connector, NEVER use bubble’s dynamic values (aka your <training_time> etc). It’ll make your life 100 times easier…
Just post your JSON body example with absolutely no other modification… Then go in your workflow, edit the JSON right from there in put your data “inline” directly in the json…
I’ve set it up like this but for some reason, I don’t see format as text after clicking the initial format as text, like you did in that video. So I tried format as JSON-Safe, but it still doesn’t separate quotations by each link, only put everything in one big quotation bracket.
I fixed it to where step 2 is setting each URL within it’s own quotation marks but this only happens in step 2, not step 1. Step 1 is simply adding the images into the database. Step 2 is setting them as their urls seperated with commas and quotations.
But on step 3 where I make the API Call, I can only use result of step1, not step2, I don’t see an option for that. And when using result of step1, an empty array gets returned… likely because it’s not setting their URL’s, just creating the new data.
You’ll use the images_json you created on your multiuploader.
But you could’ve done the searching for images and formatting as text right in the api call itself. I only used a state to show you in my video bc I didn’t have the api call you have
I set it to images_json,
It’s returning the proper list with quotations and commas, but for some reason the API isn’t responding now, even tho the call should be working now with proper syntaxing