Hi ! i need to use a PATCH request with the bubble Data API but i receive this when i use it:
{“statusCode”:405,“body”:{“status”:“ERROR”,“message”:“Unrecognized method. Currently supported: get,post”}}
So i went looking at the autorisations to make shure i autorized the modification of data and it was allowed.
Does anyone has an idea why this is not working for me ?
Only post and get request are supported.
Patch request will always fail because it’s not supported.
But Bubble’s documentation says there is a PATCH param
https://manual.bubble.io/core-resources/api/data-api#search-constraints
What URL are you using?
ops… forgot about that
import requests
url = “https://serenit.io/version-test/api/1.1/obj/RESULTS”
payload={‘price_x’: ‘400000’}
headers = {
‘Authorization’: ‘Bearer XXXXXXXXXXXXXXXX’
}
response = requests.request(“PATCH”, url, headers=headers)
print(response.text)
i am using a python code
don’t you need to specify in the url the id of the thing to change?
like /obj/results/{UniqueID}
It’s working thanks !
great!
Hi,
Following up on your response, is it only possible to use the Unique ID of the Bubble thing or can I specify another field of the thing , which contains a much shorter identificador? If it is possible, how would I specifcy that in the url?
Thanks
according to the docs it must be bubble’s unique id.