Hi Samy,
to alert on your API endpoint whenever it issues more than X database queries, you can leverage a Smart Alert (Custom Event Rule) on the "All Calls" blueprint and scope it to that endpoint.
Let me know if it is want you want to do.
BR Marcus
------------------------------
Marcus Rüsch
------------------------------