Migrate to new REST API (closes #2)