refactored the webapi into splitted files for different endpoints