Help using bulk create via endpoint with CURL

Can anyone provide information on how to use CURL on a Bubble endpoint to do a bulk create? I’m just looking for the commands, in the event I have a text file.

Say the enpoint looks like this:

POST https://myapp.bubbleapps.io/api/1.1/obj/mytype/bulk

And say my text file might look something like this (upload.txt):

{“food”: fruit, “type”: banana}
{“food”: fruit, “type”: apple}
{“food”: vegetable, “type”: carrot}

The CURL command would presumably reference the text file in the same directory where it is executed.

Try this curl command out.

curl -i -X POST -H “Content-Type: multipart/form-data” -F “[email protected]” {bubble_endpoint_url}

Replace {bubble_endpoint_url} with your endpoint…

Make sure you are in the directory of the file “upload.txt” when you execute the above curl command.

I would also suggest that you look into Postman as it abstracts a lot of the complexity of curl commands.

This topic was automatically closed after 70 days. New replies are no longer allowed.