CspViolationEventLog
This event is free for all customers with a 24-hour data retention period. The CSP violation event is available in the API but not in the Event Monitoring Analytics app.
Supported Calls
describeSObjects(), query()
Special Access Rules
To access this object, you must have the View Event Log Object Data user permission.
Fields
| Field | Details |
|---|---|
| BlockedUri |
|
| BlockedUriDomain |
|
| ColumnNumber |
|
| Context |
|
| Directive |
|
| Disposition |
|
| LineNumber |
|
| RequestIdentifier |
|
| ResourceSample |
|
| Source |
|
| SourceFile |
|
| Timestamp |
|
| UniqueIdentifier |
|
Usage
Only one CSP violation event log file is available at a time. When the daily incremental event log file is generated during the daily background process, the new file replaces the existing file.
If the event log file doesn’t exist, either the log generation process hasn’t run yet or there’s no violation data to report for that 24-hour window. The event log file is generated only when at least one violation occurred for the day.
To collect CSP violation logs for multiple days, schedule a daily query of the CSP Violation event type via REST API. For example, you can configure a cron job in Unix or a scheduled task in Windows to run the query.