defining server API