Newer Version Available
Delete Event Monitoring Data
You can delete event log files that contain a user’s log data. Deleting log files
helps you comply with data protection and privacy regulations and controls the information
that others can access.
To delete an event log file, enable deletion in Setup, and assign a user permission
in a permission set to your profile. Then you can query and delete the EventLogFile
record by using Query and Delete resources in REST or delete() in SOAP.
- In Setup, in the Quick Find box, enter Event, and then select Event Monitoring Setup.
-
Enable deletion of event monitoring data. This action is recorded in Setup
Audit Trail.
The Delete Event Monitoring Records user permission is now available to assign to a profile. - In Setup, in the Quick Find box, enter Permission, and then select Permission Sets.
- Create a permission set that includes the Delete Event Monitoring Records user permission, and save the permission set.
- In Setup, in the Quick Find box, enter Profiles, and then select Profiles.
- Edit the profile of the user that you want to allow to delete event monitoring data.
-
On the profile, assign the permission set you created and save the profile.
This action is recorded in Setup Audit Trail.
Any user assigned the profile can now delete event monitoring data. The next steps show you how to use the API to delete the data.
- Query the EventLogFile object to locate the logs containing the user activity that you want to delete. For details, see Query Event Monitoring Data with REST.
- Note the IDs of the returned logs.
- Use the SObject Rows resource to delete records. Specify the record ID and use the DELETE method. For more information, see Delete a Record. Or, you can use Workbench to delete blob format data for event monitoring. In the Execute text box, use a DELETE request similar to /services/data/v41.0/sobjects/EventLogFile/0ATD000000000pyOAA.