I have tried few ways as below :-
using API as below :-
https://www.securify.nl/blog/SFY20150303/automating-security-tests-using-owasp-zap-and-jenkins.html
But getting error as below :-
Getting error in python code for automate owsap zap for the application
I have tried with zapr
https://github.com/garethr/zapr
it's also showing error as set path while I have try to set it by every possible combination.
You have any way and their steps/ tutorial (link, video) so I can achieve same.
The new script and dependencies are present in below URL:-
https://github.com/zaproxy/zaproxy/wiki/ApiPython
Replace the changeMe apikey to zap apikey. You will find it in Tools -> options -> API.