Forum Documentation Showcase Pricing Learn more

Is this API call possible with Bubble & Webtask?


#1

I am using an API that requires a JSON body for a DELETE request, and Bubble’s API cannot send JSON. I have made the call in Insomnia so I know it works correctly with the JSON body.

So I was thinking of ways to make this call and was wondering if it could be made using Webtask
API call from my app —> Webtask —> Webtask makes the Delete call

Is this possible? Or any ideas here?

API call I am trying to make:


#2

Where did you get this info from?
You can send json body with bubble’s api connector.
See example below. Just enter your json body in the body field and for dynamic values put them inside <>. Doing that will create body parameters as seen below the body input.


#3

He’s using a DELETE call method, which doesn’t offer the JSON body input. While you can add parameters, you wouldn’t be able to do arrays.

@gf_wolfer, I can take a closer look at the API documentation you’re using and see if there’s a workaround. I haven’t worked with Webtask (yet!) but I’m sure there’s a solution…


#4

Hmmm… why not just file a bug report (RFE)? If DELETEs CAN support JSON payloads, there’s no reason that Bubble shouldn’t have a field for that here.Never realized this shortcoming. Seems like an oversight and couldn’t be that hard to add…


#5

I don’t know webtask but you definitely can do with a simple lambda or google cloud function that receives a Post call with body from bubble, then calls duda with delete, and returns the response. PM me Geoff if you want more.

I agree with Keith though, since the spec allows for this, it would be worth checking in with Bubble in case the fix is easy.


#6

@romanmg thanks for the offer! But right now I agree with @keith, let’s see if Bubble can add the JSON option to the DELETE call.

@Bubble in the Bubble API Connector, are you able to add in the JSON payload option for DELETE calls?

Postman, Swagger Inspector, etc. all support this and I have come across a few APIs that need Arrays for deleting (current on here https://www.duda.co/developers/REST-API-Reference/#delete-collection-rows)

@mebeingken this is what I was thinking - just don’t have the technical chops to pull it off. Thanks for the offer, but I agree let’s first see what Bubble can do as it seems simple enough to copy a POST call capability for the DELETE call


#7

But that’s not the same as formally making the request. You can use the bug report form to request an enhancement even if the thing described is not a bug per se, but a highly-desirable feature:

Regards,
K


#8

Definitely, submitted one. I also realized there is a Dropdown that allows you to set the DELETE call body type to JSON, yet the Input box doesn’t show. So they may have it built in, but there is a simple show/hide conditional bug on the Input box


#9

A-ha! That may be the issue. I wonder… If you just create a new API call and select that option before you do anything else, does something show? (It goes w/o saying to refresh your editor first.)


#10

We just added the ability to Send JSON Body with DELETE calls using the API Connector. Thanks for the suggestions; let us know what you think.


#11

Just tested and it works great. Thanks!