Version 12 (modified by Dominic König, 14 years ago) ( diff )


S3XRC | S3 RESTful API | S3Resource

S3Resource Class


Resources are dynamic, document-alike representations of data objects on the Eden server. As such, they can represent both single instances as well as structured sets of data objects.

Note: in the database context, a single instance of a data object is typically called a record (or row), with fields (or columns) as its atomic elements. However, even though S3Resources are typically bound to a relational database and therefore the record/field terminology is often used in this regard, they are not intended to provide any object-relational mapping (ORM).

S3Resources implement an extensible, multi-format RESTful API to retrieve and manipulate data on the Eden server by HTTP requests, where every resource can be addressed by an individual URL.

In the context of the Model-View-Controller (MVC) architecture, S3Resources are controller-generated objects. Typically, the controller generates a resource in response to an incoming HTTP request and returns a view of it (output) to the client:


A S3Resource consists of elements which can be either resources themselves (container type) or data (atomic types).

Container type elements within a resource can be:

  • primary resources (independent data objects)
  • component resources (objects which are part of a primary object)
  • referenced resources (objects which are referenced by primary or component resources)


This interface is used by the s3_rest_controller() function:

res, req = s3xrc.parse_request(module, resource)
output = res.execute_request(req, **attr)

where res is the S3Resource instance, and req the S3Request instance.

Flow Diagram


Attachments (2)

Download all attachments as: .zip

Note: See TracWiki for help on using the wiki.