Changes

stoney core: REST API

298 bytes added, 12:12, 28 May 2014
/* Filtering, sorting and searching */
For '''filtering''' the objects returned by a resource URI, the name of an object's attribute is added as a query parameter with the required value. For example, get all active user elements:
GET /v1/users?status=active
<code>GET /v1/users?status=active</code>
For '''sorting''' the objects returned by a resource URI, the query parameter <code>sort</code> is added with the object's sort attribute(s) as the value. The following example will sort users by last name and first name in lexicographic ascending order:
GET /v1/users?sort=lastname,firstname
For '''sorting''' the objects returned by a resource URI, the query parameter <code>sort</code> is added with the object's sort attribute(s) as the value. For example, The following will sort all users by their last lastname in lexicographic descending and first namein lexicographic ascending order: GET /v1/users?sort=-lastname,firstname
<code>The following will sort users by lastname and by firstname in lexicographic descending order: GET /v1/users?sort=-lastname,-firstname</code>
 For '''full text search''' the objects returned by a resource URI, the query parameter <code>q</code> is added with the value to search for. For example, <code> GET /v1/users?q=Muell</code> will return users named <code>Mueller</code> as well as the ones living at <code>Muellhaldenstrasse</code>.
For full text search over all the available resources visit [[stoney core: Search Resource - REST API]].
SLB, editor, reviewer
3,368
edits