Hello everyone,
I’m sure this is a rookie mistake, but for the life of me I can’t figure it out. I’m just trying to upsert a row, but it always inserts a new one instead of updating the existing one with the same key column. Can someone please give me a hand?
Here’s a Loom recording with my test: Loom | Free Screen & Video Recording Software | Loom
headers = {'Authorization': 'Bearer '+CODA_API_KEY}
uri = f'https://coda.io/apis/v1/docs/{DOC_ID}/tables/{TABLE_ID}/rows?disableParsing=false'
payload = {
'rows': [
{
'cells': [
{'column': 'c-LdNOdOjxic', 'value': 123},
{'column': 'c-Yy758BC3B9', 'value': random.randrange(1,50)},
],
'keyColumns': ['c-LdNOdOjxic']
},
],
}
req = requests.post(uri, headers=headers, json=payload)
req.raise_for_status() # Throw if there was an error.
res = req.json()
thanks!
Pablo