API for alerting
Scrutinizer issues fixed
Merge pull request #369 from laf/alert-api

API for alerting