Cannot update an existing field via PATCH API using Postman

PATCH https://api.baserow.io/api/database/rows/table/47108/2?field_265880=36324
Query Params key field_265880 value 36324

Table Id: 47108
F̶i̶e̶l̶d̶ Row Id: 2
Field to update: field_265880
Single select options: 36323-36327 (5 options)
Initial field value: null

It returns all fields in row id 2 and field_265880’s value is still null.

What I’ve tried:

  • use POST method while specifying key _method’s value to PATCH,
  • move query params key and value to body raw json

I’m non-technical but willing to learn. I greatly appreciate your help.

Hey @hofocihe, welcome to the Baserow community! Would you mind sharing a copy of the complete request you’re making, with URL, headers (exception the authorization), all parameters and body payload? I assume you mean row id 2 instead of field id 2, right? The values that must be updated needs to be provided as body JSON and not as a query parameter.

When you want to update the field value of a single row, you need to create a request that looks like this:

PATCH https://api.baserow.io/api/database/rows/table/47108/2
{
  "field_265880": 36324
}

Hey @bram, yes it was row id 2,

Just now I tried to put value into the body JSON, here is the response…

(Only 1 embedded media is allowed here)

Query params are now empty. Headers include Content-Type application/json and Authorization Token my_api_key.

field_265880 is still null.

I think this is what you mean by request copy?

PATCH /api/database/rows/table/47108/2 HTTP/1.1
Host: api.baserow.io
Authorization: Token ****
Content-Type: application/json
Cookie: route=1644434102.963.1133.729979|18908edba08133a6b61633027a9e6314
Content-Length: 91

{
“field_265880”: 36324
}

This is the headers:

Sharing for sharing all the details. It’s a bit strange because your request looks good. I’ve tried to replicate your request with Postman and I was able to update the value. What happens when you change your request path to /api/database/rows/table/47108/2/, so with an slash added to the end.

Oh my, yeah it was the missing piece. It works now. Thank you @bram !

1 Like