The
LogMessagesHook.py script calls a couple of ZAP APIs so you should be able to get the gist from those.
The packaged scans do not allow you to choose the report you want, and I don't see that changing.
The packaged scans are (slowly) being migrated to use the AF under the covers in any case.
Cheers,
Simon