<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Alfresco Content Services Api Rest Audit filter in Alfresco Forum</title>
    <link>https://connect.hyland.com/t5/alfresco-forum/alfresco-content-services-api-rest-audit-filter/m-p/138861#M37164</link>
    <description>&lt;P&gt;The Audit API simply does not support supplying more than one filter using valuesKey/valuesValue. The API documentation states that&lt;/P&gt;
&lt;PRE&gt;The list can be filtered by one or more of:
- createdByUser person id
- createdAt inclusive time period
- id inclusive range of ids
- valuesKey audit entry values contains the exact matching key
- valuesValue audit entry values contains the exact matching value
&lt;/PRE&gt;
&lt;P&gt;Linguistically, this can be understood in different ways. Unfortunately for your use case, the interpretation is not that you can use either of these fields multiple times, rather that you can use one of those fields or multiple of them, but each field only once.&lt;/P&gt;
&lt;P&gt;&lt;A href="https://github.com/Alfresco/alfresco-community-repo/blob/ef441fc2c80fea43e70bbfa7171448729c8cb6cb/remote-api/src/main/java/org/alfresco/rest/api/impl/AuditImpl.java#L459" target="_self" rel="nofollow noopener noreferrer"&gt;Looking at the implementation&lt;/A&gt;, the documentation also seems to contain a lie/omission: It is not possible to use valuesKey or valuesValue without the other&lt;/P&gt;</description>
    <pubDate>Tue, 22 Jun 2021 08:14:13 GMT</pubDate>
    <dc:creator>afaust</dc:creator>
    <dc:date>2021-06-22T08:14:13Z</dc:date>
    <item>
      <title>Alfresco Content Services Api Rest Audit filter</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/alfresco-content-services-api-rest-audit-filter/m-p/138860#M37163</link>
      <description>&lt;P&gt;I'm using API rest for Audit.&lt;/P&gt;&lt;P&gt;I don't get the correct filter for filtering by type and action.&lt;/P&gt;&lt;P&gt;Using the endpoint:&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;/alfresco/api/-default-/public/alfresco/versions/1/audit-applications/alfresco-access/audit-entries&lt;/PRE&gt;&lt;P&gt;I'm testing with the examples in the api-explorer page:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;P&gt;where=(valuesKey='/alfresco-access/transaction/action' and valuesValue='DELETE')&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;where=(createdByUser='jbloggs')&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Each one works individually but do not combinated,&lt;/P&gt;&lt;P&gt;For example:&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;(valuesKey='/alfresco-access/transaction/action' and valuesValue='CREATE')&lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Give me the correct list for "CREATE" actions.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;(valuesKey='/alfresco-access/transaction/type' and valuesValue='cm:folder' )&lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Give the correct list in "cm:folder" actions&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;But:&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;(valuesKey='/alfresco-access/transaction/type' and valuesValue='cm:folder' &lt;STRONG&gt;) (&lt;/STRONG&gt;valuesKey='/alfresco-access/transaction/action' and valuesValue='CREATE')&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Give only "cm:folder" actions&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;(valuesKey='/alfresco-access/transaction/type' and valuesValue='cm:folder'&amp;nbsp; &lt;STRONG&gt;and&lt;/STRONG&gt; valuesKey='/alfresco-access/transaction/action' and valuesValue='CREATE')&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Same problem&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;(valuesKey='/alfresco-access/transaction/type' and valuesValue='cm:folder'&lt;STRONG&gt;)&amp;nbsp; and (&lt;/STRONG&gt;valuesKey='/alfresco-access/transaction/action' and valuesValue='CREATE')&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Same problem&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;What is the correct filter for type and action?&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Thanks in advance&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Tue, 22 Jun 2021 02:45:14 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/alfresco-content-services-api-rest-audit-filter/m-p/138860#M37163</guid>
      <dc:creator>gregorio2501</dc:creator>
      <dc:date>2021-06-22T02:45:14Z</dc:date>
    </item>
    <item>
      <title>Re: Alfresco Content Services Api Rest Audit filter</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/alfresco-content-services-api-rest-audit-filter/m-p/138861#M37164</link>
      <description>&lt;P&gt;The Audit API simply does not support supplying more than one filter using valuesKey/valuesValue. The API documentation states that&lt;/P&gt;
&lt;PRE&gt;The list can be filtered by one or more of:
- createdByUser person id
- createdAt inclusive time period
- id inclusive range of ids
- valuesKey audit entry values contains the exact matching key
- valuesValue audit entry values contains the exact matching value
&lt;/PRE&gt;
&lt;P&gt;Linguistically, this can be understood in different ways. Unfortunately for your use case, the interpretation is not that you can use either of these fields multiple times, rather that you can use one of those fields or multiple of them, but each field only once.&lt;/P&gt;
&lt;P&gt;&lt;A href="https://github.com/Alfresco/alfresco-community-repo/blob/ef441fc2c80fea43e70bbfa7171448729c8cb6cb/remote-api/src/main/java/org/alfresco/rest/api/impl/AuditImpl.java#L459" target="_self" rel="nofollow noopener noreferrer"&gt;Looking at the implementation&lt;/A&gt;, the documentation also seems to contain a lie/omission: It is not possible to use valuesKey or valuesValue without the other&lt;/P&gt;</description>
      <pubDate>Tue, 22 Jun 2021 08:14:13 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/alfresco-content-services-api-rest-audit-filter/m-p/138861#M37164</guid>
      <dc:creator>afaust</dc:creator>
      <dc:date>2021-06-22T08:14:13Z</dc:date>
    </item>
    <item>
      <title>Re: Alfresco Content Services Api Rest Audit filter</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/alfresco-content-services-api-rest-audit-filter/m-p/138862#M37165</link>
      <description>&lt;P&gt;&lt;A href="https://migration33.stage.lithium.com/t5/user/viewprofilepage/user-id/16045"&gt;@afaust&lt;/A&gt;&amp;nbsp;Thanks for reply.&lt;/P&gt;&lt;P&gt;Maybe can I do the query direct in the database? Can you explain me?&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best regards.&lt;/P&gt;</description>
      <pubDate>Tue, 22 Jun 2021 17:48:54 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/alfresco-content-services-api-rest-audit-filter/m-p/138862#M37165</guid>
      <dc:creator>gregorio2501</dc:creator>
      <dc:date>2021-06-22T17:48:54Z</dc:date>
    </item>
    <item>
      <title>Re: Alfresco Content Services Api Rest Audit filter</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/alfresco-content-services-api-rest-audit-filter/m-p/138863#M37166</link>
      <description>&lt;P&gt;I really can't explain much more than what you can &lt;A href="https://github.com/Alfresco/alfresco-community-repo/blob/master/repository/src/main/resources/alfresco/ibatis/org.alfresco.repo.domain.dialect.Dialect/audit-common-SqlMap.xml#L229" target="_self" rel="nofollow noopener noreferrer"&gt;read in the sources for direct SQL queries&lt;/A&gt;. Due to the significant normalisation of keys/values, queries can become quite complex pretty fast - which is one reason why Alfresco themselves did not bother to support more than one key-value pairing as selection criteria.&lt;/P&gt;</description>
      <pubDate>Tue, 22 Jun 2021 18:39:42 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/alfresco-content-services-api-rest-audit-filter/m-p/138863#M37166</guid>
      <dc:creator>afaust</dc:creator>
      <dc:date>2021-06-22T18:39:42Z</dc:date>
    </item>
    <item>
      <title>Re: Alfresco Content Services Api Rest Audit filter</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/alfresco-content-services-api-rest-audit-filter/m-p/138864#M37167</link>
      <description>&lt;P&gt;&lt;A href="https://migration33.stage.lithium.com/t5/user/viewprofilepage/user-id/16045"&gt;@afaust&lt;/A&gt;&amp;nbsp;thanks for your reply.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 22 Jun 2021 21:41:42 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/alfresco-content-services-api-rest-audit-filter/m-p/138864#M37167</guid>
      <dc:creator>gregorio2501</dc:creator>
      <dc:date>2021-06-22T21:41:42Z</dc:date>
    </item>
    <item>
      <title>Re: Alfresco Content Services Api Rest Audit filter</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/alfresco-content-services-api-rest-audit-filter/m-p/138865#M37168</link>
      <description>&lt;P&gt;Hi.&amp;nbsp;&lt;A href="https://migration33.stage.lithium.com/t5/user/viewprofilepage/user-id/75711"&gt;@gregorio2501&lt;/A&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks for accepting the answer as a solution.&lt;/P&gt;
&lt;P&gt;Cheers,&lt;/P&gt;</description>
      <pubDate>Thu, 24 Jun 2021 10:53:50 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/alfresco-content-services-api-rest-audit-filter/m-p/138865#M37168</guid>
      <dc:creator>EddieMay</dc:creator>
      <dc:date>2021-06-24T10:53:50Z</dc:date>
    </item>
  </channel>
</rss>

