edit apis, change absolute path to relative, refactor