Restful Objects

From Wikipedia, the free encyclopedia

Restful Objects is a standard covering RESTful interfaces to domain object models. The specification is published under a Creative Commons license.

The standard defines a small set of JSON representations covering the generic constructs in a domain object model including the following:

  • A list of links to domain objects
  • A single domain object
  • A property, collection, belonging to a domain object
  • An action that may be invoked on a domain object
  • An action result (which will typically include a domain object or list)
  • A domain service (essentially a stateless domain object)
  • A small number of very specific representations such as Home, Version, and User.

Restful Objects also defines a standard set of resources for accessing or manipulating these representations. The specification defines which HTTP methods may be used with each resource, and their meaning. The table below shows a partial summary:

HTTP method Object Property Collection Action[clarify] Action Invoke[clarify]
GET Object summary, member summary, property values Property, details and value Collection details and content Action prompt Invoke (if query only)
PUT Update or clear multiple property values Update or clear value Add object (if set semantics) — – 405 error Invoke (if idempotent)
DELETE Delete object Clear value Remove object — – 405 error — – 405 error
POST — – 405 error — – 405 error Add object (if list semantics) — – 405 error Invoke (any)

Taken together the resources and representations allow the complete functionality of a domain object model to be accessed over HTTP. The following diagram, taken from the specification, illustrates the relationship between the most commonly used resources and representations:

Principal resources and representations defined by the restful objects specification

History and status

The Restful Objects specification version 1.0.0 was released in June 2012.

Framework implementations

Relationship to other ideas

Related Articles

Wikiwand AI