coverting grails product to restful api