[Openvas-commits] r8195 - trunk/doc/website

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Sat Jun 26 20:10:13 CEST 2010


Author: mattm
Date: 2010-06-26 20:10:12 +0200 (Sat, 26 Jun 2010)
New Revision: 8195

Modified:
   trunk/doc/website/openvas-cr-28.htm4
Log:
Update get_tasks and get_reports.

Modified: trunk/doc/website/openvas-cr-28.htm4
===================================================================
--- trunk/doc/website/openvas-cr-28.htm4	2010-06-26 18:08:50 UTC (rev 8194)
+++ trunk/doc/website/openvas-cr-28.htm4	2010-06-26 18:10:12 UTC (rev 8195)
@@ -2414,63 +2414,126 @@
 <b>C:</b>
 </p>
 
-m4_dnl FIX <report> is also used in <get_tasks_response>
-m4_dnl FIX     perhaps the two uses should be merged
+<pre>
+&lt;get_reports report_id="267a3405-e84a-47da-97b2-5fa0d2e8995e" format="PDF"/&gt;
+</pre>
 
+<p>
+<b>M:</b>
+</p>
+
 <pre>
-&lt;get_reports report_id="267a3405-e84a-47da-97b2-5fa0d2e8995e"&gt;
-  &lt;format&gt;PDF&lt;/format&gt;
-&lt;/get_reports&gt;
+&lt;get_reports_response status="200" status_text="OK"&gt;
+  &lt;report id="f0fdf522-276d-4893-9274-fb8699dc2270"&gt;hsisn3qaVFhkjFRG4...&lt;/report&gt;
+&lt;/get_reports_response&gt;
 </pre>
 
 <p>
+<b>C:</b>
+</p>
+
+<pre>
+&lt;get_reports report_id="267a3405-e84a-47da-97b2-5fa0d2e8995e"/&gt;
+</pre>
+
+<p>
 <b>M:</b>
 </p>
 
 <pre>
 &lt;get_reports_response status="200" status_text="OK"&gt;
-  &lt;report&gt;hsisn3qaVFhkjFRG4...&lt;/report&gt;
+  &lt;report id="f0fdf522-276d-4893-9274-fb8699dc2270"&gt;
+    &lt;sort&gt;
+      &lt;field&gt;
+        type
+        &lt;order&gt;descending&lt;/order&gt;
+      &lt;/field&gt;
+    &lt;/sort&gt;
+    &lt;filters&gt;
+      hmlgd
+      &lt;phrase&gt;&lt;/phrase&gt;
+      &lt;notes&gt;0&lt;/notes&gt;
+      &lt;overrides&gt;0&lt;/overrides&gt;
+      &lt;apply_overrides&gt;0&lt;/apply_overrides&gt;
+      &lt;result_hosts_only&gt;1&lt;/result_hosts_only&gt;
+      &lt;min_cvss_base&gt;&lt;/min_cvss_base&gt;
+      &lt;filter&gt;High&lt;/filter&gt;
+      &lt;filter&gt;Medium&lt;/filter&gt;
+      &lt;filter&gt;Low&lt;/filter&gt;
+      &lt;filter&gt;Log&lt;/filter&gt;
+      &lt;filter&gt;Debug&lt;/filter&gt;
+    &lt;/filters&gt;
+    &lt;scan_run_status&gt;Done&lt;/scan_run_status&gt;
+    &lt;result_count&gt;
+      10
+      &lt;filtered&gt;10&lt;/filtered&gt;
+      &lt;debug&gt;0&lt;/debug&gt;
+      &lt;hole&gt;0&lt;/hole&gt;
+      &lt;info&gt;7&lt;/info&gt;
+      &lt;log&gt;0&lt;/log&gt;
+      &lt;warning&gt;3&lt;/warning&gt;
+    &lt;/result_count&gt;
+    &lt;task id="13bb418a-4220-4575-b35b-ec398bff7417"&gt;
+      &lt;name&gt;dik mm&lt;/name&gt;
+    &lt;/task&gt;
+    &lt;ports start="1" max="-1"&gt;
+      &lt;port&gt;
+        general/tcp
+        &lt;host&gt;127.0.1.1&lt;/host&gt;
+        &lt;threat&gt;Medium&lt;/threat&gt;
+      &lt;/port&gt;
+      ...
+    &lt;/ports&gt;
+    &lt;results start="1" max="-1"&gt;
+      &lt;result id="634f7a2e-8ca1-43b7-b6d7-0d4841449508"&gt;
+        &lt;subnet&gt;127.0.1.1&lt;/subnet&gt;
+        &lt;host&gt;127.0.1.1&lt;/host&gt;
+        &lt;port&gt;general/tcp&lt;/port&gt;
+        &lt;nvt oid="1.3.6.1.4.1.25623.1.0.74"&gt;
+          &lt;name&gt;Test plugin: fields with ISO-8859-1 chars (ü)&lt;/name&gt;
+          &lt;cvss_base&gt;5.0&lt;/cvss_base&gt;
+          &lt;risk_factor&gt;Medium&lt;/risk_factor&gt;
+        &lt;/nvt&gt;
+        &lt;threat&gt;Medium&lt;/threat&gt;
+        &lt;description&gt;Test with ü umlaut Warning Port 0.&lt;/description&gt;
+      &lt;/result&gt;
+      ...
+    &lt;/results&gt;
+    &lt;scan_start&gt;Mon Feb  1 19:11:21 2010&lt;/scan_start&gt;
+    &lt;host_start&gt;Mon Feb  1 19:11:21 2010&lt;host&gt;127.0.1.1&lt;/host&gt;&lt;/host_start&gt;
+    &lt;host_end&gt;Mon Feb  1 19:11:52 2010&lt;host&gt;127.0.1.1&lt;/host&gt;&lt;/host_end&gt;
+    &lt;scan_end&gt;Mon Feb  1 19:11:52 2010&lt;/scan_end&gt;
+  &lt;/report&gt;
 &lt;/get_reports_response&gt;
 </pre>
 
 <h4 id="get_tasks">get_tasks</h4>
 
 <p>
-The client uses the get_tasks command to request task information.
+The client uses the get_tasks command to request task information.  This command
+may include a task ID, details flag, apply overrides flag, sort order and sort
+field,
 </p>
 
 <p>
-If the get_tasks command is sent without a task ID, the manager will respond with
-the number of tasks and a list of the tasks that have been stored for the user
-issuing this command. The list will include the ID of the task, the
-human-readable identifier, an element describing the state of the report
-(Running, Done etc.) and five numbers indicating the number of security holes,
-security notes, security infos, log messages and debug messages discovered
-during the last run of this task.
+If the command includes the details flag each task will include details of all
+reports on the task.
 </p>
 
 <p>
-If the get_tasks command is sent with a task ID, the manager will respond with
-detailed information on the requested task ID.
-If the task is not currently running, the response will include the number of
-reports that are available for this task and a list containing the IDs of the
-reports, a timestamp indicating when this report was created and five numbers
-indicating the number of security holes, security notes, security infos, log
-messages and debug messages described in this report. If there is a comment
-included in the report, it will be sent as well.
-If the task is currently running, the response will include the IP of the host
-currently being scanned and five numbers indicating the number of security
-holes, security notes, security infos, log messages and debug messages which
-have been received so far during this run of the task.
-In either case, the manager will include the task name and task status
-(New, Running, Done, etc) in the response.
+As a convenience for clients the response includes a task count and the values
+of the sort order, sort field and apply overrides flag that the manager applied
+when selecting the tasks.
 </p>
 
 <p>
 Command attributes:
 <ul>
-  <li>"task_id" is the ID of the task which should be queried.
-  <li>"details" is the ID of the task which should be queried.
+  <li>"task_id" is the ID of the task which should be queried.</li>
+  <li>"details" is boolean (0 is false, anything else is true).</li>
+  <li>"apply_overrides" is boolean (0 is false, anything else is true).</li>
+  <li>"sort_order" is "descending" for descending, anything else for ascending.</li>
+  <li>"sort_field" is the field to sort on.</li>
 </ul>
 </p>
 
@@ -2498,27 +2561,71 @@
 <pre>
 &lt;get_tasks_response status="200" status_text="OK"&gt;
   &lt;task_count&gt;2&lt;/task_count&gt;
+  &lt;sort&gt;
+    &lt;field&gt;
+      ROWID
+      &lt;order&gt;ascending&lt;/order&gt;
+    &lt;/field&gt;
+  &lt;/sort&gt;
+  &lt;apply_overrides&gt;0&lt;/apply_overrides&gt;
   &lt;task id="254cd3ef-bbe1-4d58-859d-21b8d0c046c6"&gt;
     &lt;name&gt;Scan Webserver&lt;/name&gt;
-    &lt;status&gt;Running&lt;/status&gt;
-    &lt;messages&gt;
-      &lt;hole&gt;0&lt;/hole&gt;
+    &lt;comment&gt;Scan of the web server.&lt;/name&gt;
+    &lt;status&gt;Done&lt;/status&gt;
+    &lt;progress&gt;-1&lt;/progress&gt;
+    &lt;config id="daba56c8-73ec-11df-a475-002264764cea"&gt;
+      &lt;name&gt;Full and fast&lt;/name&gt;
+    &lt;/config&gt;
+    &lt;escalator id=""&gt;
+      &lt;name&gt;&lt;/name&gt;
+    &lt;/escalator&gt;
+    &lt;target id="1f28d970-17ef-4c69-ba8a-13827059f2b9"&gt;
+      &lt;name&gt;dik&lt;/name&gt;
+    &lt;/target&gt;
+    &lt;schedule id=""&gt;
+      &lt;name&gt;&lt;/name&gt;
+      &lt;next_time&gt;over&lt;/next_time&gt;
+    &lt;/schedule&gt;
+    &lt;result_count&gt;
+      &lt;debug&gt;0&lt;/debug&gt;
+      &lt;log&gt;0&lt;/log&gt;
+      &lt;info&gt;14&lt;/info&gt;
       &lt;warning&gt;0&lt;/warning&gt;
-      &lt;info&gt;0&lt;/info&gt;
-      &lt;log&gt;0&lt;/log&gt;
-      &lt;debug&gt;0&lt;/debug&gt;
-    &lt;/messages&gt;
+      &lt;hole&gt;6&lt;/hole&gt;
+    &lt;/result_count&gt;
+    &lt;report_count&gt;
+      2
+      &lt;finished&gt;2&lt;/finished&gt;
+    &lt;/report_count&gt;
+    &lt;trend&gt;&lt;/trend&gt;
+    &lt;first_report&gt;
+      &lt;report id="f0fdf522-276d-4893-9274-fb8699dc2270"&gt;
+        &lt;timestamp&gt;Mon Feb  1 19:11:20 2010&lt;/timestamp&gt;
+        &lt;result_count&gt;
+          &lt;debug&gt;0&lt;/debug&gt;
+          &lt;hole&gt;0&lt;/hole&gt;
+          &lt;info&gt;7&lt;/info&gt;
+          &lt;log&gt;0&lt;/log&gt;
+          &lt;warning&gt;3&lt;/warning&gt;
+        &lt;/result_count&gt;
+      &lt;/report&gt;
+    &lt;/first_report&gt;
+    &lt;last_report&gt;
+      &lt;report id="f0fdf522-276d-4893-9274-fb8699dc2270"&gt;
+        &lt;timestamp&gt;Mon Feb  1 19:11:20 2010&lt;/timestamp&gt;
+        &lt;result_count&gt;
+          &lt;debug&gt;0&lt;/debug&gt;
+          &lt;hole&gt;0&lt;/hole&gt;
+          &lt;info&gt;7&lt;/info&gt;
+          &lt;log&gt;0&lt;/log&gt;
+          &lt;warning&gt;3&lt;/warning&gt;
+        &lt;/result_count&gt;
+      &lt;/report&gt;
+    &lt;/last_report&gt;
   &lt;/task&gt;
   &lt;task id="f14747d3-a4d7-4e79-99bb-a0a1276cb78c"&gt;
     &lt;name&gt;Scan Mailserver&lt;/name&gt;
-    &lt;status&gt;Done&lt;/status&gt;
-    &lt;messages&gt;
-      &lt;hole&gt;0&lt;/hole&gt;
-      &lt;warning&gt;2&lt;/warning&gt;
-      &lt;info&gt;5&lt;/info&gt;
-      &lt;log&gt;0&lt;/log&gt;
-      &lt;debug&gt;7&lt;/debug&gt;
-    &lt;/messages&gt;
+    ...
   &lt;/task&gt;
 &lt;/get_tasks_response&gt;
 </pre>
@@ -2528,7 +2635,7 @@
 </p>
 
 <pre>
-&lt;get_tasks task_id="f14747d3-a4d7-4e79-99bb-a0a1276cb78c" /&gt;
+&lt;get_tasks task_id="f14747d3-a4d7-4e79-99bb-a0a1276cb78c" details="1" /&gt;
 </pre>
 
 <p>
@@ -2537,97 +2644,96 @@
 
 <pre>
 &lt;get_tasks_response status="200" status_text="OK"&gt;
-  &lt;name&gt;Scan Mailserver&lt;/name&gt;
-  &lt;status&gt;Done&lt;/status&gt;
-  &lt;report_count&gt;5&lt;/report_count&gt;
-  &lt;report id="fc2ae4a9-8819-4159-b94b-5210db2f6f38"&gt;
-    &lt;timestamp&gt;2009-03-10T10:21Z&lt;/timestamp&gt;
-    &lt;messages&gt;
-      &lt;hole&gt;1&lt;/hole&gt;
-      &lt;warning&gt;2&lt;/warning&gt;
-      &lt;info&gt;5&lt;/info&gt;
-      &lt;log&gt;3&lt;/log&gt;
-      &lt;debug&gt;3&lt;/debug&gt;
-    &lt;/messages&gt;
-    &lt;comment/&gt;
-  &lt;/report&gt;
-  &lt;report id="bcfeca57-0068-494b-a0bc-7b056649bd8b"&gt;
-    &lt;timestamp&gt;2009-03-10T10:29Z&lt;/timestamp&gt;
-    &lt;messages&gt;
-      &lt;hole&gt;0&lt;/hole&gt;
-      &lt;warning&gt;1&lt;/warning&gt;
-      &lt;info&gt;5&lt;/info&gt;
-      &lt;log&gt;2&lt;/log&gt;
-      &lt;debug&gt;3&lt;/debug&gt;
-    &lt;/messages&gt;
-    &lt;comment&gt;Applied patch&lt;/comment&gt;
-  &lt;/report&gt;
-  &lt;report id="0c176f64-faf8-4544-8de7-12dbccb3831c"&gt;
-    &lt;timestamp&gt;2009-03-10T11:19Z&lt;/timestamp&gt;
-    &lt;messages&gt;
-      &lt;hole&gt;0&lt;/hole&gt;
-      &lt;warning&gt;0&lt;/warning&gt;
-      &lt;info&gt;3&lt;/info&gt;
-      &lt;log&gt;2&lt;/log&gt;
-      &lt;debug&gt;3&lt;/debug&gt;
-    &lt;/messages&gt;
-    &lt;comment/&gt;
-  &lt;/report&gt;
-  &lt;report id="80d0096d-4216-42a7-b727-e6955c08f97b"&gt;
-    &lt;timestamp&gt;2009-03-11T16:42Z&lt;/timestamp&gt;
-    &lt;messages&gt;
-      &lt;hole&gt;0&lt;/hole&gt;
-      &lt;warning&gt;0&lt;/warning&gt;
-      &lt;info&gt;2&lt;/info&gt;
-      &lt;log&gt;2&lt;/log&gt;
-      &lt;debug&gt;3&lt;/debug&gt;
-    &lt;/messages&gt;
-    &lt;comment/&gt;
-  &lt;/report&gt;
-  &lt;report id="5d6294dd-e634-4f06-ae64-ef97e68b0e43"&gt;
-    &lt;timestamp&gt;2009-03-11T17:02Z&lt;/timestamp&gt;
-    &lt;messages&gt;
-      &lt;hole&gt;0&lt;/hole&gt;
-      &lt;warning&gt;0&lt;/warning&gt;
-      &lt;info&gt;1&lt;/info&gt;
-      &lt;log&gt;1&lt;/log&gt;
-      &lt;debug&gt;3&lt;/debug&gt;
-    &lt;/messages&gt;
-    &lt;comment/&gt;
-  &lt;/report&gt;
-&lt;/get_tasks_response&gt;
-</pre>
-
-<p>
-<b>C:</b>
-</p>
-
-<pre>
-&lt;get_tasks task_id="254cd3ef-bbe1-4d58-859d-21b8d0c046c6" /&gt;
-</pre>
-
-<p>
-<b>M:</b>
-</p>
-
-<pre>
-&lt;get_tasks_response status="200" status_text="OK"&gt;
-  &lt;task id="254cd3ef-bbe1-4d58-859d-21b8d0c046c6"&gt;
+  &lt;task_count&gt;1&lt;/task_count&gt;
+  &lt;sort&gt;
+    &lt;field&gt;
+      ROWID
+      &lt;order&gt;ascending&lt;/order&gt;
+    &lt;/field&gt;
+  &lt;/sort&gt;
+  &lt;apply_overrides&gt;0&lt;/apply_overrides&gt;
+  &lt;task id="13bb418a-4220-4575-b35b-ec398bff7417"&gt;
     &lt;name&gt;Scan Mailserver&lt;/name&gt;
-    &lt;status&gt;Running&lt;/status&gt;
-    &lt;current_ip&gt;192.168.1.5&lt;/current_ip&gt;
-    &lt;messages&gt;
-      &lt;hole&gt;0&lt;/hole&gt;
+    &lt;comment&gt;Scan of the web server.&lt;/name&gt;
+    &lt;status&gt;Done&lt;/status&gt;
+    &lt;progress&gt;-1&lt;/progress&gt;
+    &lt;config id="daba56c8-73ec-11df-a475-002264764cea"&gt;
+      &lt;name&gt;Full and fast&lt;/name&gt;
+    &lt;/config&gt;
+    &lt;escalator id=""&gt;
+      &lt;name&gt;&lt;/name&gt;
+    &lt;/escalator&gt;
+    &lt;target id="1f28d970-17ef-4c69-ba8a-13827059f2b9"&gt;
+      &lt;name&gt;dik&lt;/name&gt;
+    &lt;/target&gt;
+    &lt;schedule id=""&gt;
+      &lt;name&gt;&lt;/name&gt;
+      &lt;next_time&gt;over&lt;/next_time&gt;
+    &lt;/schedule&gt;
+    &lt;result_count&gt;
+      &lt;debug&gt;0&lt;/debug&gt;
+      &lt;log&gt;0&lt;/log&gt;
+      &lt;info&gt;14&lt;/info&gt;
       &lt;warning&gt;0&lt;/warning&gt;
-      &lt;info&gt;1&lt;/info&gt;
-      &lt;log&gt;1&lt;/log&gt;
-      &lt;debug&gt;3&lt;/debug&gt;
-    &lt;/messages&gt;
+      &lt;hole&gt;6&lt;/hole&gt;
+    &lt;/result_count&gt;
+    &lt;report_count&gt;
+      2
+      &lt;finished&gt;2&lt;/finished&gt;
+    &lt;/report_count&gt;
+    &lt;trend&gt;&lt;/trend&gt;
+    &lt;first_report&gt;
+      &lt;report id="f0fdf522-276d-4893-9274-fb8699dc2270"&gt;
+        &lt;timestamp&gt;Mon Feb  1 19:11:20 2010&lt;/timestamp&gt;
+        &lt;result_count&gt;
+          &lt;debug&gt;0&lt;/debug&gt;
+          &lt;hole&gt;0&lt;/hole&gt;
+          &lt;info&gt;7&lt;/info&gt;
+          &lt;log&gt;0&lt;/log&gt;
+          &lt;warning&gt;3&lt;/warning&gt;
+        &lt;/result_count&gt;
+      &lt;/report&gt;
+    &lt;/first_report&gt;
+    &lt;last_report&gt;
+      &lt;report id="2688e6c7-db29-4505-80f1-0fd4a09e1011"&gt;
+        &lt;timestamp&gt;Mon Feb  1 19:11:20 2010&lt;/timestamp&gt;
+        &lt;result_count&gt;
+          &lt;debug&gt;0&lt;/debug&gt;
+          &lt;hole&gt;0&lt;/hole&gt;
+          &lt;info&gt;7&lt;/info&gt;
+          &lt;log&gt;0&lt;/log&gt;
+          &lt;warning&gt;3&lt;/warning&gt;
+        &lt;/result_count&gt;
+      &lt;/report&gt;
+    &lt;/last_report&gt;
+    &lt;reports&gt;
+      &lt;report id="f0fdf522-276d-4893-9274-fb8699dc2270"&gt;
+        &lt;timestamp&gt;Mon Feb  1 18:51:38 2010&lt;/timestamp&gt;
+        &lt;scan_run_status&gt;Done&lt;/scan_run_status&gt;
+        &lt;result_count&gt;
+          &lt;debug&gt;0&lt;/debug&gt;
+          &lt;hole&gt;0&lt;/hole&gt;
+          &lt;info&gt;7&lt;/info&gt;
+          &lt;log&gt;0&lt;/log&gt;
+          &lt;warning&gt;3&lt;/warning&gt;
+        &lt;/result_count&gt;
+      &lt;/report&gt;
+      &lt;report id="2688e6c7-db29-4505-80f1-0fd4a09e1011"&gt;
+        &lt;timestamp&gt;Mon Feb  1 19:11:20 2010&lt;/timestamp&gt;
+        &lt;scan_run_status&gt;Done&lt;/scan_run_status&gt;
+        &lt;result_count&gt;
+          &lt;debug&gt;0&lt;/debug&gt;
+          &lt;hole&gt;0&lt;/hole&gt;
+          &lt;info&gt;7&lt;/info&gt;
+          &lt;log&gt;0&lt;/log&gt;
+          &lt;warning&gt;3&lt;/warning&gt;
+        &lt;/result_count&gt;
+      &lt;/report&gt;
+    &lt;/reports&gt;
   &lt;/task&gt;
 &lt;/get_tasks_response&gt;
 </pre>
 
-
 <h4 id="get_version">get_version</h4>
 
 <p>



More information about the Openvas-commits mailing list