Introduced restful functions on gateway

Signed-off-by: Nick Wade <nwade@pivotallabs.com>