Changes

stoney core: REST API

346 bytes added, 08:52, 12 February 2014
/* Relations */
If a relation can only exist within another resource, it will be represent by its URI, for example: <code>/threads/123/messages/45</code>. This URI represents the message with ID #45 of the forum thread with ID #123.
If a resources can stand by its own, such as users it won't be added as a subFurther examples to clarify above explanation:* <code>/v1/resellers/4000001/customers</code> -> collection resource.(all customers of reseller with uid=4000001)Relations are always returned as URIs, which * <code>/v1/resellers/4000001/customers/4000002</code> -> resource (the client can hit.customer with uid=4000002 of reseller with uid=4000001)
@TBD: Shall there be a functionality to request The following queries have the embedding of elements, for relations that are commonly requested alongside same effect as the URIs from above:* <code>/v1/customers?belongsToResellerUID=4000001</code> -> collection resource (to save requestsall customers of reseller with uid=4000001)?* <code>/v1/customers/4000002</code> -> resource (the customer with uid=4000002 of reseller with uid=4000001) Relations are always returned as URIs, which the client can hit.
=== Filtering, sorting and searching ===
SLB, editor, reviewer
3,368
edits