Moab Web Services > API Documentation > RESTful Web Services

RESTful Web Services

In order to understand how to use MWS, it is first necessary to give a brief introduction to REST. REST (Representational State Transfer) is a set of guidelines which utilizes the full HTTP (Hypertext Transfer Protocol) specification along with endpoint URLs that describe resources. The HTTP methods used in REST are comprised of the following:

Method Description
GET Query for a list or a single resource.
POST Creating a resource.
PUT Modifying a resource.
DELETE Deleting a resource.

In comparison to other architectures of web services which use a single HTTP method and service endpoint to perform multiple types of operations (such as a POST operation to a URL), REST utilizes all of the available HTTP methods and URLs that directly correlate to resources. For example, RESTful web services for books in a library may expose many URL endpoints and the HTTP methods available for each such as GET, POST, PUT, and DELETE. The list below gives the methods, URLs, and descriptions for a sample set of services. The number 1 represents a unique identifier for books in each case.

Method URL Description
GET /books Retrieves a list of all books in the library.
POST /books Creates a new book.
GET /books/1 Retrieves a single book.
PUT /books/1 Modifies a single books.
DELETE /books/1 Deletes a single book.

Note that in the cases of the POST and PUT operations, additional information may be needed to describe the resource to be created or the fields that should be modified.

Moab Web Services provides RESTful web services for many resources. The methods and URLs available are documented in Resources Introduction.

Related Topics 

© 2015 Adaptive Computing