db: clear code
clear code and add thing api doc