create API for server side