provide a JavaScript API rather than a REST API