move gettables to api controller