RestAPI migrated to groovy