How can I create a list of all defined behaviors?

For documentation purposes, I need a list of the defined behaviors with information about which projects they are assigned to. How can I create this in a script?

Hi PaKIto,
A call to https://YOURJIRA/rest/scriptrunner/behaviours/latest/admin/behaviour
should return list of setup behaviors in JSON format.

Hi nikolayr,
That was exactly what I was looking for. Thank you so much!