Added methods to manage system hooks from API

Fixes #2013