Add functional draft of REST API.