FeatureFuel
0

REST: deleting by filter has no limit and is permanent by default

Source: twentyhq/twenty#28762 · opened by @Nikolay-Chillev
Bug Description DELETE /rest/companies?filter=… deletes every matching record in one request. In my test a filter that matched 311 companies deleted all of them. Updating by filter is limited to 200 records ("Cannot update more than 200 records at once"), and so is a batch create, but a delete has no limit. REST deletes are also permanent unless soft_delete=true is sent. The records do not go to the trash and cannot be restored. In the app and with GraphQL's deleteCompany, a delete moves records to the trash, so the same action does two different things. Steps to reproduce, with an API key: 1. Create 300 companies named Cleanup test 1 … Cleanup test 300, for example with two POST /rest/batch/companies requests of 150 each 2. PATCH /rest/companies?filter=name[like]:"Cleanup test%" with {"address": {"addressCity": "Sofia"}} is refused: 400 "Cannot update more than 200 records at once" 3. DELETE /rest/companies?filter=n…

No pledges yet. Be the first to back this.

Make a pledge

Pledge your monetary support if this feature is added.

$

Comments

No comments yet.

Replying to

Add a comment

What do you think about this feature request?


Similar requests