adding garfield api for using garfield in browser and with rest