basic API of frontend