Is there any way of getting a content audit trail via Umbraco API?
I need to find out what was the last action called on the content, eg. whether it was Save or Save and Publish.
There is an angular resource that allows you to query the audit log from the backoffice called logResource... and this is a wrapper for a WebApiController
How to get audit trail info in Umbraco API?
Is there any way of getting a content audit trail via Umbraco API? I need to find out what was the last action called on the content, eg. whether it was Save or Save and Publish.
I need it via API (not backoffice).
Hi nickornotto
There is an angular resource that allows you to query the audit log from the backoffice called logResource... and this is a wrapper for a WebApiController
https://our.umbraco.com/apidocs/v7/csharp/api/Umbraco.Web.Editors.LogController.html?q=logcontroller
which has a GetPagedEntityLog(Int32, Int32, Int32, Direction, Nullable
But you'd need I think to authenticate to the backoffice to request this...
Anyway this BackofficeApiController extracts the information using the AuditService
https://our.umbraco.com/apidocs/v7/csharp/api/Umbraco.Core.Services.AuditService.html?q=auditserv
So if you need to access the info outside of Umbraco, you could create your own WebAPIController and use the AuditService to query the AuditLog??
regards
marc
Thanks, I'll try with LogController.
I tried to use AuditService but it doesn't seem to work in Umbraco 7.
is working on a reply...