How to disable or change active events of the webhook via code?

System Information
  • Strapi Version: 4.13.7
  • Operating System: mac os
  • Database: postgres
  • Node Version: v16.19.1
  • NPM Version: 8.19.3

I am wondering if I can do put request do turn off my webhook from the code or change active events?

The issue I have is that I do strapi.entityService.create in map function witch triggers webhook for each entity.

I can’t do createMany because of this - To avoid performance issues, bulk operations are not allowed on relations.

So I decide to keep strapi.entityService.create but disable webhook with put request and then turn back on.

I hot-fixed it like this:

Works well, but pretty annoying… also needs to be patched/replaced after downloading packages and before building :scream_cat: