Sending data to API

Hi, Im a beginner. I want to connect bubble database to my program via http post/get.

I can get the details by http get this url https://alerttest22.bubbleapps.io/version-test/api/1.1/obj/dbtest/1589827945400x418940885029093400

But how can I modify the data on that listing?

The database table has two columns. Col1 and Col2. I want to modify the data on Col1.

I tried to do this
HTTP POST
URL: https://alerttest22.bubbleapps.io/version-test/api/1.1/obj/dbtest/1589827945400x418940885029093400
Parameter: {“Col1”: Test}

I set the privacy as well

Please let me know what’s wrong.

Thanks

Hi, I did a PUT on that URL and got a 204, seems to be validating. I sent ‘WhyHelloThere’.

If your field in the db is called Col1, it should have updated.

1 Like

Hi, What tool did you use to test that? I can see what you put on the database! Thanks

Yeah, the GET shows the updated data :slight_smile:
I’m using Postman.

Hi, Can you tell me whats wrong with my code. I tried to put this below. There’s no error but the Col1 column is blank. It should put the word Test there.

It’s having this status 204 No Content

Put Test in quotation marks and make sure the body is raw JSON.

204 is valid, it just means that no response body is being returned by your request.

You’ve also put your data on the Params tab. Put it on the Body tab.

Hi, Can you send me a screenshot of how you did it. Sorry but I am new to this… I am doing it this way but it still doesnt work.

Almost. Just copy my structure completely. You have left the " off the col1.

also , it’s not form data, it’s raw.

then when raw is selected, select JSON since that is the format you are sending data in.

Hi, I tried it but it’s still giving me error…

not valid JSON. copy my structure.

{
“Col1”: “WhyHelloThere”
}

1 Like

It’s working now! You are very helpful… Thanks!

No worries. Have a good night from Sydney, Australia :slight_smile:

1 Like

Please, how solve this: “Unrecognized method. Currently supported: get,post”