Getting ready to implement to the demo.
[pazpar2-moved-to-github.git] / PROTOCOL
index 62bd822..5e3ad07 100644 (file)
--- a/PROTOCOL
+++ b/PROTOCOL
@@ -1,7 +1,8 @@
 
 Webservice requests are any that refer to filename "search.pz2". Arguments
 are GET-style parameters. Argument 'command' is required and specifies
-command.
+command. Any request not recognized as a webservice request as described,
+are forwarded to the HTTP server specified in option -p.
 
 Commands:
 
@@ -65,6 +66,7 @@ search.pz2?session=2044502273&command=stat
 Output:
 
 <stat>
+  <activeclients>3</activeclients>
   <hits>7</hits>                   -- Total hitcount
   <records>7</records>             -- Total number of records fetched
   <clients>1</clients>             -- Total number of associated clients
@@ -87,6 +89,11 @@ parameters:
 session
 start      -- 0-indexed!!
 num        -- default=20
+block      -- 0 or 1
+
+If block is set, the command will hang until there are records ready
+to display. Use this to show first records rapidly without requiring rapid
+polling.
 
 Example:
 
@@ -96,6 +103,7 @@ Output:
 
 <show>
   <status>OK</status>
+  <activeclients>3</activeclients>
   <merged>6</merged>
   <total>7</total>
   <start>0</start>
@@ -111,3 +119,38 @@ Output:
     </title>
   </hit>
 </show>
+
+termlist
+
+Retrieves term list(s)
+
+parameters:
+
+session
+name       -- comma-separated list of termlist names (default "subject")
+
+Example:
+
+search.pz2?session=2044502273&command=termlist&name=author,subject
+
+Output:
+
+<termlist>
+  <activeclients>3</activeclients>
+  <list name="author">
+    <term>
+      <name>Donald Knuth</name>
+      <frequency>10</frequency>
+    </term>
+    <term>
+      <name>Robert Pirsig</name>
+      <frequency>2</frequency>
+    </term>
+  </list>
+  <list name="subject">
+    <term>
+      <name>Computer programming</name>
+      <frequency>10</frequency>
+    </term>
+  </list>
+</termlist>