restify the API