How to cancel jobs in "pending" state efficiently?

Hi,
As a side effect of the restore process, any scheduled jobs I have are also restored. The :jigsaw: issue is I don’t want scheduled jobs to be running on non production nodes.
So far the only way I have found to automate cancelation of jobs in pending state at instance level is to use /projects APIs to get all projects and then /jobs APIs to cancel any pending jobs. The problem is - that is a lot of API calls. :face_exhaling:
I wonder if there is an efficient way to do this without having to make all these API calls?

Thanks in advance :slight_smile: