oneM2M Logo transparent 196x130

Standards for M2M and the Internet of Things

TR-0057 REST Architecture

REST Architecture

Representational State Transfer (REST) is a software architectural style that defines a set of constraints to be used for creating web services.

RESTful services allow the requesting systems to access and manipulate textual representations of resources by using a uniform and predefined set of stateless operations. A stateless protocol operation does not require the server to retain session information or status about each communicating partner for the duration of multiple requests.

REST is not a protocol. It is about manipulating resources, uniquely identified by URIs. A resource is stateful and contains a link pointing to another resource. All the actions on resources are done through a Uniform Interface.

As REST is an architecture style, it can be mapped to multiple protocols such as HTTP, CoAP, etc…

Six guiding constraints define a RESTful system. These constraints restrict the ways in which the server can process and respond to client requests

  • Client-server: separation of concerns is the principle behind the client-server constraints.

  • Stateless server: request from client to server contains all of the information necessary to understand the request, and cannot take advantage of any stored context on the server.

  • Cache: the client can reuse response data, sent by the server, by storing it in a local cache.

  • Layered system: allows an architecture to be composed of hierarchical layers. It enables the addition of features like a gateway, a load balancer, or a firewall to accommodate system scaling.

  • Code-on-demand: (optional) REST allows client functionality to be extended by downloading and executing code in the form of scripts (e.g. JavaScript).

  • Uniform interface

    • Identification of resources: resource identifier enables the identification of the particular resource involved in an interaction between components.

    • Manipulation of resources through representations: resource representations are the state of a resource that is transferred between components.

    • Self-descriptive messages: contain metadata to describe the meaning of the message.

    • Hypermedia as the engine of application state or HATEOAS: Clients find their way through the API by following links available in the resource representations.

Subscribe to oneM2M News Please enter your name and email address, then click on submit.
Alternatively, you can send an email from your preferred email application with a blank subject to with subscribe oneM2M_News in the message body.

Subscribe to oneM2M News

Your Name(*)
Please let us know your name.

Your Email(*)
Please let us know your email address.