Put / patch API

Hello all,

Working with a developer who’s mentioned the below and we’re wondering if this is correct or not.

“The bubble API does not currently support their PATCH or PUT endpoints.
These endpoints would allow us to update the records in the database.”

We are trying to send a row of data out of bubble via the api along with the unique ID param. We’re then wanting to get it back and overwrite the same row of data using the unique ID param to direct it to the right place.

Any suggestions on how to achieve this appreciated.

S

Hey @klobassimon,

Perhaps I’m misunderstanding your post, but in the API connector, along with the plugin api section, you can make a request using those operators, and setting the Use as to Action. This will allow you to send via a workflow.

Hi there. I’m finding the same issue. You cannot send a PUT request to: https://your_app/version-test/api/1.1/obj/your_object

But there is an easy workaround.

You can set up a backend workflow to modify the object that you want to change.

You can set up the input parameters coming from your PUT call exactly the same way your object is set up. Here’s how: When setting up your backend wf, select the button “Detect data”. This will give you a url to post your input JSON schema to. So have your dev put your input schema into a tool like Postman and fire it to that url. Then bubble will pull in all the parameters for you.

Next, set up a workflow element: “Make changes to a thing”. Use the search function to find your thing.

Here’s a tip, when setting up the input schema, add a parameter “unique_id” and pass the unique_id of the object you are trying to change. Then in your search element, search for object by object’s “unique id” = This request’s “unique_id”.

Now, instead of sending a PUT to …obj/your_object, you send a POST request to …wf/your_obj and it will achieve the exact same result.

Hope this helps