Save the date! Join us on October 16 for our Product Ops launch event. Register here.
Oct 10, 2019 06:19 AM
I am trying to patch fields, however I am facing trouble with the record ID:
Here are the records
{"records": [{"id": "recMcKXnqXUsJ2Ptu", "fields": {"Name": "GoodLife"}, "createdTime": "2019-10-10T11:56:56.000Z"}, {"id": "recayWtmjGL5k1kgK", "fields": {"Name": "Love"}, "createdTime": "2019-10-10T11:56:56.000Z"}, {"id": "recqCoVKArOQS4UPL", "fields": {"Name": "Fashion"}, "createdTime": "2019-10-10T11:56:56.000Z"}]}
And here is the error message I received
{'error': {'type': 'ROW_DOES_NOT_EXIST', 'message': 'Record ID recayWtmjGL5k1kgK does not exist in this table'}}
As you can see above, there actually is a record with the ID recayWtmjGL5k1kgK
, hence I do not understand the error message.
Solved! Go to Solution.
Oct 10, 2019 06:57 AM
Sure. I am working in Python using the requests module to connect to the API.
Here is the response I receive together with the URL, status code and body that I sent with my request (authentication is handled via the headers which I did not include below)
[{"response": {"error": {"type": "ROW_DOES_NOT_EXIST", "message": "Record ID recayWtmjGL5k1kgK does not exist in this table"}}, "url": "https://api.airtable.com/v0/appLxbm3SqFQrvreS/Artist", "status_code": 422, "body": {"records": [{"id": "recayWtmjGL5k1kgK", "fields": {"ID": 22}}, {"id": "recqCoVKArOQS4UPL", "fields": {"ID": 23}}]}, "method": "PATCH"}]
EDIT
Nevermind, I just noticed my mistake. It lies in the URL: I am addressing to the wrong table, silly me.
Oct 10, 2019 06:46 AM
Indeed there is. But it’s important to see how you are attempting to address this record. Give us a little more insight into the code.
Oct 10, 2019 06:57 AM
Sure. I am working in Python using the requests module to connect to the API.
Here is the response I receive together with the URL, status code and body that I sent with my request (authentication is handled via the headers which I did not include below)
[{"response": {"error": {"type": "ROW_DOES_NOT_EXIST", "message": "Record ID recayWtmjGL5k1kgK does not exist in this table"}}, "url": "https://api.airtable.com/v0/appLxbm3SqFQrvreS/Artist", "status_code": 422, "body": {"records": [{"id": "recayWtmjGL5k1kgK", "fields": {"ID": 22}}, {"id": "recqCoVKArOQS4UPL", "fields": {"ID": 23}}]}, "method": "PATCH"}]
EDIT
Nevermind, I just noticed my mistake. It lies in the URL: I am addressing to the wrong table, silly me.