api,db: query added