Is it possible to POST data with array [] of objects in /api/{collection-name} ? (Bulk Operations)

System Information
  • Strapi Version: 4.9.0
  • Operating System: Linux Deepin 20.3
  • Database: MySQL 8.0.2
  • Node Version: 18.15.0
  • NPM Version: 9.5.0
  • Yarn Version: 1.22.19

I know that we can use db queries to do Bulk Operations in our custom controllers, but I want to know if we can POST an array of objects in an default collection created in Strapi?

Something like this in the body of an request:

{
    "data": [
        {
            "id": 12312,
            "value": "123213"
        },
        {
            "id": 123124,
            "value": "123213"
        }
    ]
}

And with this body create two entries automatically without do custom controllers? Or is another way to send an array of objects?

1 Like