align server and client functions with specified api