Get List of folders that have the same type of task

How to get the list of folders that are having same type of task for ex., jenkins build task using API or any other method.

Thanks.

What is your goal ?
The maybe easiest way would be to use “as code” approach, export all templates as yaml and then do a text based search on that yaml files with the tool of your choice, alternatively, you could iterate trough all folders, templates in the folder, phases in the templates, tasks in the phases, get the task type, so you need 5 nested loops in a script using the API…