REST API implementation.