Ruby Client - Bulk destroy

Hi,
I’m trying to destroy records in bulk as described in the documentation with the Ruby gem.
I’m using the exact same code as in the example, with my API token and with a valid record ID.
I’m getting the following error:

Status: 422
Response:
{
  "data": [
    {
      "id": "302f12",
      "type": "api_error",
      "attributes": {
        "code": "INVALID_FORMAT",
        "details": {
          "messages": [
            "#/data: failed schema #/definitions/item/links/16/schema/properties/data: \\"attributes\\" is not a permitted key.",
            "#/data/type: failed schema #/definitions/item/links/16/schema/properties/data/properties/type: item does not match /^item_bulk_destroy_operation$/."
          ]
        }
      }
    }
  ]
}

Could you have a look? Maybe the documentation need to be updated?

Regards,

Hi @Pol0nium

I’ve moved this topic under Support. May I ask you which version of our ruby client are you using? In the mean time I’m going to reproduce the bug with the latest version and I’ll write it again :slight_smile:

Hi,
Thanks for your reply.

gem list | grep dato
> dato (0.8.0)
> dato_json_schema (0.20.9)

Regards,

Hi @Pol0nium

I can confirm the bug in the ruby client. Sorry for this :frowning:

I’ve openend a bug report for the rest of the team. In the mean time, can you please use the single destroy method instead and cycle over the items? It’s slower but it should work :slight_smile:

I’ll contact you again when it’s fixed

Thanks for reporting this!

Thanks! Yes, I’m using the single destroy method at the moment.
I’ll wait for the update.
Regards,

hello @Pol0nium we have fixed this in v0.8.1 of our Ruby client, hope it’s useful!