[Bps-public-commit] rt-extension-rest2 07/07: Document saved search usage

sunnavy sunnavy at bestpractical.com
Wed Jul 14 10:05:54 EDT 2021


This is an automated email from the git hooks/post-receive script.

sunnavy pushed a commit to branch saved-searches
in repository rt-extension-rest2.

commit 77790c24e3e9f9f52a8ca050f110502c535c35e9
Author: sunnavy <sunnavy at bestpractical.com>
AuthorDate: Fri May 28 06:25:05 2021 +0800

    Document saved search usage
---
 lib/RT/Extension/REST2.pm | 23 ++++++++++++++++++++++-
 1 file changed, 22 insertions(+), 1 deletion(-)

diff --git a/lib/RT/Extension/REST2.pm b/lib/RT/Extension/REST2.pm
index 3d07d64..7ce60ef 100644
--- a/lib/RT/Extension/REST2.pm
+++ b/lib/RT/Extension/REST2.pm
@@ -464,8 +464,19 @@ curl for SSL like --cacert.
     GET /tickets?simple=1;query=<simple search query>
         search for tickets using simple search syntax
 
+    # If there are multiple saved searches using the same description, the
+    # behavior of "which saved search shall be selected" is undefined, use
+    # id instead in this case.
+
+    # If both search and other arguments like "query" are specified, the
+    # latter takes higher precedence than the corresponding fields defined
+    # in the given saved search.
+
+    GET /tickets?search=<saved search id or description>
+        search for tickets using saved search
+
     POST /tickets
-        search for tickets with the 'query' and optional 'simple' parameters
+        search for tickets with the 'search' or 'query' and optional 'simple' parameters 
 
     POST /ticket
         create a ticket; provide JSON content
@@ -810,6 +821,16 @@ Below are some examples using the endpoints above.
     GET /customrole/:id
         retrieve a custom role
 
+=head3 Saved Searches
+
+    GET /searches?query=<JSON>
+    POST /searches
+        search for saved searches using L</JSON searches> syntax
+
+    GET /search/:id
+    GET /search/:description
+        retrieve a saved search
+
 =head3 Miscellaneous
 
     GET /

-- 
To stop receiving notification emails like this one, please contact
sysadmin at bestpractical.com.


More information about the Bps-public-commit mailing list