You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@syncope.apache.org by il...@apache.org on 2018/04/26 14:46:23 UTC

[2/2] syncope git commit: Adding info and samples for sorting search results

Adding info and samples for sorting search results


Project: http://git-wip-us.apache.org/repos/asf/syncope/repo
Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/8124b88f
Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/8124b88f
Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/8124b88f

Branch: refs/heads/master
Commit: 8124b88ff01a4ccecd78c2d85ff2cd4d244846db
Parents: a9ffb6f
Author: Francesco Chicchiriccò <il...@apache.org>
Authored: Thu Apr 26 16:45:55 2018 +0200
Committer: Francesco Chicchiriccò <il...@apache.org>
Committed: Thu Apr 26 16:46:10 2018 +0200

----------------------------------------------------------------------
 .../restfulservices.adoc                        | 32 ++++++++++++++++++++
 1 file changed, 32 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/syncope/blob/8124b88f/src/main/asciidoc/reference-guide/workingwithapachesyncope/restfulservices.adoc
----------------------------------------------------------------------
diff --git a/src/main/asciidoc/reference-guide/workingwithapachesyncope/restfulservices.adoc b/src/main/asciidoc/reference-guide/workingwithapachesyncope/restfulservices.adoc
index e12dfc7..1266a25 100644
--- a/src/main/asciidoc/reference-guide/workingwithapachesyncope/restfulservices.adoc
+++ b/src/main/asciidoc/reference-guide/workingwithapachesyncope/restfulservices.adoc
@@ -331,6 +331,38 @@ username=~*iNi;(loginDate==$null,$roles==Other)
 ----
 ====
 
+===== Sorting Search Results
+
+Search results can be requested for sorting by passing the optional `orderBy` query parameter to the search endpoints
+available, e.g.
+
+* `GET /users?fiql=query&orderBy=sort`
+* `GET /groups?fiql=query&orderBy=sort`
+* `GET /anyObjects?fiql=query&orderBy=sort`
+
+where `sort` is an URL-encoded string representation of the sort request, as in the following examples.
+
+.Single attribute sort, default direction (`ASC`)
+====
+----
+username
+----
+====
+
+.Single attribute sort, with direction
+====
+----
+username DESC
+----
+====
+
+.Multiple attribute sort, with directions
+====
+----
+email DESC, username ASC
+----
+====
+
 ==== Client Library
 
 The Java client library simplifies the interaction with the <<core>> by hiding the underlying HTTP