9.2 Interface
Here we describe the interface which is common to all database resource implementations.
9.2.1 URI structure
The URI structure can be summarized as follows (* = 0 or more occurences, ? = 0 or 1 occurence):
/entityname(/id/propertyname)*(/id)?
The following table shows some examples of what is possible:
|
/myentity |
list of all myentity records |
|
/myentity/1 |
the entity myentity with id = 1 |
|
/myentity/1/myproperty |
assuming myproperty is a property of myentity, and that myproperty is an entity by itself, this will return the entity associated through myproperty. If myproperty is a list, it will return the list of all such entities. |
|
/myentity>/1/myproperty/2 |
Same as the previous, but assumes myproperty is a list, and will only return the entity with id = 2. |
Previous