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

http://blog.mwaysolutions.com/2014/06/05/10-best-practices-for-better-restful-api/

Microsoft API Guideline

https://github.com/Microsoft/api-guidelines/blob/master/Guidelines.md

Sample Code

/**
 * bookstore
 * bookstore.rest.books
 */
(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 ]);
 
})(RESTService);

After that you can send an HTTP call to https://your-instance-url.inpaas.com/api/bookstore/books 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

Overview


Suggested Edits are limited on API Reference Pages

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