Refactor API controller to work RESTful

Signed-off-by: JWhy <jwhy@jwhy.de>