REST Services libraries simplify the creation of endpoints and the integration from web pages using a simple Controller interface.

RESTful Services

10 Best practices for a better RESTful API

Microsoft API Guideline

Sample Code

 * bookstore
(function(ctrl) {
    // fluent syntax
    ctrl.addEndpoint({ name: "findBooks", method: "GET", path: "/books" },  
                function findBooks() {
                // ...
    // declarative syntax
    function getBook(id) {
        // ...
    function setBook(id, data) {
        // ...
    ctrl.addEndpoint({ name: "getBook", method: "GET", path: "/books/{id}" }, [ "id", getBook ]);
    ctrl.addEndpoint({ name: "setBook", method: "PUT", path: "/books/{id}" }, [ "id", data, setBook ]);

After that you can send an HTTP call to and see the results in JSON format.

When creating a REST Service, the RESTService object is available for setting up your API and your endpoints.

Updated less than a minute ago


Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.