fix #1717(api): move api register into api for core