attach to rest server