Allow set row_id for insert over API

Hi

when a line is deleted in a table it would be useful to re-insert this line with the original id. The usecase is in a synchronization between seatable and a foreign system. The inserted IDs are saved in a synchronization database.
In case a record is deleted manually in a table the record should be recreated with the original id to avoid having to substitute all further relations in the base, therefore it should be possible to pass the row_id, also for an insert statement, not only for update.

{    
    "row": {
        "Name": "Name Surname", 
        "First-Name": "Name", 
        "Last-Name": "Surname", 
        "Title": "Technical Coordinator", 
        "Email": "name.surname@domain.com", 
        "Foreign-ID": "980285b0dbe6d8105ac82bce859619ea", 
        "Username": "xyz0002", 
        "Status": "Active", 
        "Created-by": "API",
        "row_id": "G3yPdT-qQTqXGr3ZWuz2PQ"
        },    
    "table_name": "Employee"
}

BR, Gino

Thanks for your interesting feature request.

I can note this, but I don’t think it’ll be available any time soon. In your use case, I would rather suggest you to restore the deleted row and update its content.

Because in SeaTable, the row_id is unique in each base. When you have deleted a row, two things happen:

  • The row is marked as deleted and can be seen in the “Trash” or “Deleted rows” for the next 7 days.
  • A new base snapshot is established.

In both cases, the deleted row still has its old row_id, in case you restore this row from the Trash or, you restore the whole snapshot.

So, inserting a row with this ID will cause potential conflicts in the above case.

Thank you for the explanation

Ok, I understand, in this case, as you mentioned, it makes not really sense!
I know this from relational databases, that when a record is deleted you have missing relations to other records, therefore it would be nice to have the chance to insert again this missing record with the same id.
Is there a way to restore the deleted record from the API? I didn’t find anything in the API reference.
Thank you

You are welcome! Unfortunately, we don’t have this API at the moment.

Hello, just create an aditional column , then when adding the row , put a GUID, and use it as the key .
This is done on many situations

1 Like