[rest] register and unregister refs in slot representation