Bulk deleting rows via the API with API Version V2

I am trying to delete several rows via the API.
I am using the endpoint {{baseUrl}}/api-gateway/api/v2/dtables/:base_uuid/rows/

Authorization etc. are going through but I am always running into the output deleted_rows: 0
Furthermore, I tried it with referencing one or several row IDs which did not change the output being 0.

  1. Is it even possible to delete several rows with this enpoint?
  2. If yes, what could be the reason for getting as output deleted_rows: 0?

Thank you so much in advance for your help!
Postman API Documentation

Hi @Jon, and welcome to the SeaTable forum!
I’m not familiar with Postman, but I had a look at the SeaTable API documentation about deleting rows and saw that the param passing the ids of the rows to delete is actually row_ids, whereas it seems to be row_id in the Postman documentation you linked in your previous message. Could that be the reason of the error?

I tested to delete several rows (from https://api.seatable.io), my request data looked like

{
  "table_name": "Créneaux répèt",
  "row_ids": [
    "BIF9khNBSBu6EdgFbgE_dQ",
    "XjsYzsx3SrWfq5Tzfh_HIA",
    "GrowvTyHSly6rEiKy60ExA"
  ]
}

and it returned { "deleted_rows": 3 } as expected…
If the row_ids parameter’s name is not the problem, maybe you could try to execute your request from api.seatable.io to see if it works :thinking:

Bests,
Benjamin

1 Like

Hi @bennhatton
thank you so much for your quick response!
I will take a look at the row_id vs row_ids issue and keep you updated, whether it solved the issue.
Again, thank you so much for your quick and valuable response :slight_smile:

Hi @bennhatton,

your solution worked quite smooth. Thanks!
The json looks like:

{
“row_ids”: [
“xxx”,
“xxx”
],
“table_id”: “xxx”
}

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.