Bulk of work on RestApi