change api and cli to match with the users api functions