cancel
Showing results for 
Search instead for 
Did you mean: 

Alfresco Audit REST API

pedwards99
Star Contributor
Star Contributor

Hello,

I'm trying to use the REST API to retrieve audit data from Alfresco. In particular I want to return audit entries created after a specific date. The api-explorer gives some examples of returning audit data between dates using:

where=(createdAt BETWEEN ('first date', 'second date'))

This works, but what are the other operators? 

I've tried AFTER, BEFORE, GREATERTHAN, > etc, but nothing seems to work.

Does anyone know if there are any other operators and where they are documented?

Many thanks

Paul

1 ACCEPTED ANSWER

pedwards99
Star Contributor
Star Contributor

To answer my own question...

I managed to track down the source code for the Audit API in GitHub. It seems that the only supported operators are =, AND and BETWEEN.

I've changed my code to use BETWEEN('start date', 'now') to return me all audit entries created after 'start date'

Regards

Paul

View answer in original post

4 REPLIES 4

pedwards99
Star Contributor
Star Contributor

To answer my own question...

I managed to track down the source code for the Audit API in GitHub. It seems that the only supported operators are =, AND and BETWEEN.

I've changed my code to use BETWEEN('start date', 'now') to return me all audit entries created after 'start date'

Regards

Paul

Will you please give step by step process of how to do site audit.

Thanks in Advance

EddieMay
World-Class Innovator
World-Class Innovator

Hi @pedwards99 

Well done on finding a solution - & thanks for updating us, really helpful to other users.

Cheers,

Digital Community Manager, Alfresco Software.
Problem solved? Click Accept as Solution!

silversky
Champ on-the-rise
Champ on-the-rise

Hi

I ran the REST API in the following way and succeeded.

where=(createdAt BETWEEN('2019-01-28T00:00:00.000Z','2019-01-29T14:59:59.000Z'))

Perhaps it is necessary to put it completely including time.