title: How to extract audit log from Apache Ranger via REST API
body: <p>I need to extract daily the audit log, I thought of using the REST API. But I don't understand how to extract it with a curl.</p>
  <p>I saw this link:
  <a href="https://ranger.apache.org/apidocs/resource_AssetREST.html#resource_AssetREST_searchXPolicyExportAudits_GET" rel="nofollow noreferrer">https://ranger.apache.org/apidocs/resource_AssetREST.html#resource_AssetREST_searchXPolicyExportAudits_GET</a></p>
  <p>In this case the request is:</p>
  <pre><code>  GET /assets/exportAudit
    Content-Type: */*
    Accept: application/json
    ...
  </code></pre>
  <p>Maybe to extract the log is correctly this:</p>
  <p><a href="https://ranger.apache.org/apidocs/resource_AssetREST.html#resource_AssetREST_getReportLogs_GET" rel="nofollow noreferrer">https://ranger.apache.org/apidocs/resource_AssetREST.html#resource_AssetREST_getReportLogs_GET</a></p>
  <p>In this case the request is:</p>
  <pre><code>  GET /assets/report
    Content-Type: */*
    Accept: application/json
    ...
  </code></pre>
  <p>How I can convert it into a curl? to test it and understand if the output is what i want?</p>
  <p>For example I want extract audit information from a HDFS Policy.
  Alternatively, is there a better way to extract the log?</p>