UXP with Canvas and saving

Hi
I am working on a plugin with a canvas panel inside. What I would like to know is, is it possible to save the workspace so that it can be restored and have all the canvas usage restored as when it was saved?
Thanks

Rob