For the complete documentation index, see llms.txt. This page is also available as Markdown.

Audit

Add audit logging for custom objects using the scripting API.

Static method

record(title, objectId, action, options)

Arguments

  • title { String }

  • objectId { ObjectID }

  • action { String } For example, create, read, update, delete, access, and transfer

  • options { Object } Options object

    • metadata { Object }

    • err {Fault}

Associate audit logs with custom objects

You can associate audit logs with custom objects using a script to add custom property information to the audit logs.

This only applies to user audit events in the subcategories listed below.

create ​ ​​

audit.record('my_object', _id, 'create', {metadata: {message: 'Create custom object'}})​​ ​ ​ ​

read ​ ​​

audit.record('my_object', _id, 'read', {metadata: {message: 'Read custom object'}}) ​​ ​ ​ ​

update

​​audit.record('my_object', _id, 'update', {metadata: {message: 'Update custom object'}})​​ ​ ​ ​

delete

​​audit.record('my_object', _id, 'delete', {metadata: {message: 'Delete custom object'}})​​ ​ ​

access

​​audit.record('my_object', _id, 'access', {metadata: {message: 'Access custom object'}})​​ ​ ​ ​

transfer

​audit.record('my_object', _id, 'transfer', {metadata: {message: 'Transfer custom object'}})​​ ​

Example: Create audit record

Object schema

Last updated

Was this helpful?