How-to use the Rest API