[api] move the webui engine classes into the api structure