Heads Up :
The post you are writing will appear in a public forum. Please ensure all content is appropriate for public consumption. Review the employee guidelines for the community here.
Edit: Sorry, I read netconf instead of restconf. I haven't had much luck with restconf but if you are willing to try netconf this will probably work.
Take a look at Cisco-IOS-XE-rpc as I believe this is what you are looking for (haven't tried it ...