api controller, rabl templates and integration