Basic Principles

Method

RESTful web services are based on the Hypertext Transfer Protocol (HTTP). HTTP defines several methods which represent specific operations. Note that all methods are idempotent except the POST method.

POST

Creates a new entity of a resource. After the successful creation of a new entity a "201 Created" with a HTTP Location header (links to the new resource) is returned.

GET

Retrieves information of a resource identified by an uniform identifier (URI).

DELETE

Deletes a resource identified by an uniform identifier (URI).

PUT

Updates the information of a specific resource identified by an uniform identifier (URI). Sometimes PUT can create a new entity of a resource if the entity does not exist.

OPTIONS

Returns the supported operations for a given resource. By default a WADL

representation (Web Application Description Language) is returned.

HEAD

This operation is currently not supported by our framework. The HEAD method would deliver the same response of an operation, but without the body content.

CRUD

You can associate the HTTP methods above with their CRUD counterpart:

  • Create: POST
  • Read: GET
  • Update: PUT
  • Delete: DELETE

For functional resources (i. e. starting an action like a calculation or starting a broadcasting) you can use the POST method with the status code of 200 instead of 201 (Created). In this case a Location header is not required.