Add document for policy audit api's
[policy/parent.git] / docs / pap / pap.rst
index fe2288b..d3cbf8b 100644 (file)
@@ -120,6 +120,7 @@ PAP supports the operations listed in the following table, via its REST API:
    "Policy Status", "Queries the status of all policies"
    "Policy deployment status", "Queries the status of all deployed policies"
    "PDP statistics", "Queries the statistics of PDPs"
+   "Policy Audit", "Queries the audit records of policies"
 
 1.2 DMaaP API
 -------------
@@ -369,11 +370,40 @@ Here is a sample response:
 .. literalinclude:: response/pdp-statistics-pap-resp.json
     :language: json
 
+:download:`Download Policy Audit PAP API Swagger  <swagger/policy-audit-pap.json>`
 
-3 Future Features
+.. swaggerv2doc:: swagger/policy-audit-pap.json
+
+This operation allows the audit records of policies to be listed together.
+The result can be filtered based on pdp group name, policy name & version.
+Along with record count, from date & to date as query parameters.
+
+Here is a sample response:
+
+.. literalinclude:: response/policy-audit-pap-resp.json
+    :language: json
+
+3 Configuration
+=================
+
+3.1 Disable collection of PDP Statistics
+========================================
+
+This configuration is to inform PAP to not save the PDP statistics in the database.
+
+In `config.json
+<https://github.com/onap/policy-pap/blob/master/packages/policy-pap-tarball/src/main/resources/etc/defaultConfig.json>`_,
+add or change the property savePdpStatisticsInDb to false.
+
+.. note::
+  By default, if the property is not present, it will be considered as false and
+  PDP statistics will not be saved in the database.
+
+
+4 Future Features
 =================
 
-3.1 Disable policies in PDP
+4.1 Disable policies in PDP
 ===========================
 
 This operation will allow disabling individual policies running in PDP engine. It is mainly beneficial