Rebased #1787 - Initial REST API