Adds callback that can share state via rest calls