I have created some event scripts using the web interface editor. After I have created these event scripts, I am able to manually run the script successfully doing what is intended through rest/system/script/{scriptid}. However, when I think I am triggering the event that this script is supposed to be triggered by (i.e. using ‘Try it out’) through the swagger api page, the script doesn’t appear to be running at all. The logs also show no events being triggered.
Is there something/steps I am missing from creating the event script to getting it triggered by rest api calls? Do I need to register it? Or is event triggering disabled when done through swagger or web interface interacitons? Thanks for your help!
I am writing a script for the /user/register api call. I ended up getting it to work by writing a script for user.register.post.post_process and it’s cool! But noticed a few odd things.
user.create never gets triggered, contrary to what it says in the swagger docs
event.request.body.email returned ‘undefined’ when logged. I ended up accessing the email through the response and this worked fine.