use the existing resource api to dehydrate (bug 856211)