Rewrite to use the REST API
merge