bulkDestroy throws too many operations error


I don’t see any documentation on this, but I was wondering if there are any limits on the bulkDestroy API endpoint with regard to the items field length.

I tried destroying 486 records in bulk and received an API error saying TOO_MANY_OPERATIONS I then went and batched the deletes in 100 records chunks and it worked.

Also, the results array looks to be always an empty array!

Hello @ali.haider and welcome to the community!

Can you send us the response code you are getting when doing the bulk request? Is it a 429?

@m.finamor, it’s a 422 and this is the error log I get:

error - ApiError: POST https://site-api.datocms.com/items/bulk/destroy: 422 Unprocessable Entity

    "id": "some_id",
    "type": "api_error",
    "attributes": {
      "code": "TOO_MANY_OPERATIONS",
      "details": {}

Also not sure, if this helps, but I was trying to delete all records in a model/collection in bulk using this call.

@ali.haider sorry but we couldn’t reproduce the error on our end :frowning:
If this happens once again, please let us know by sending the request you made and the project link at support@datocms.com so we can try and single out the problem and fix it

Thank you for the feedback,