Content Security Policy reports browsers sent
Content Security Policy violations on the organization's sites.
A site whose policy names fastmon in report-to or report-uri gets a
report from the browser for every script, style or request the policy
blocked, or would have blocked under Content-Security-Policy-Report-Only.
The answer counts them over the window, per bucket, per directive and per
disposition.
Beside each count stands affected_visitors, the distinct visitors behind
it. A visitor is a non-zero stitch, so only sites with store_stitch
count them, and meta.stitchless_site_ids names the sites that do not.
The counts are the reports the browsers sent. The edge does not sample
them, so meta.sampling does not describe them. disposition tells
blocked violations (enforce) from merely reported ones (report), and
'' counts the reports whose browser did not say.
Filters: the site scope, stitch, the report's own report_id,
disposition, effective_directive, blocked_url, source_url,
page_url and status_code_range, and the edge-derived dimensions
(country, device_type, browser, browser_version, os,
bot_class, is_bot, is_datacenter, bot_name, bot_type,
datacenter, ua_anomaly). exclude takes disposition,
effective_directive, blocked_url, source_url, page_url and the
nine edge labels. Any other filter is a 422 naming it, since an empty
answer would read as "no violations".
Authorization
bearerAuth API token generated from the fastmon dashboard (Account → API Token) or at organization level (fmo_…, one that outlives its creator). Send as Authorization: Bearer fm_... or paste the full token (including its prefix) into the Authorize dialog.
In: header
Path Parameters
uuidRequest Body
application/json
Request for the Content Security Policy reports of the organization's sites.
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/organizations/497f6eca-6276-4993-bfeb-53cbbbba6f08/analytics/csp" \ -H "Content-Type: application/json" \ -d '{ "time_range": { "from": "2019-08-24T14:15:22Z", "to": "2019-08-24T14:15:22Z" } }'{ "meta": { "execution_time_ms": 0, "total": 0, "limit": 0, "offset": 0, "has_more": true, "next_cursor": "string", "sampling": { "sampling_rate": 0, "is_sampled": true, "estimated_metrics": [ "string" ] }, "stitchless_site_ids": [ "69469e5a-8ce7-4bbc-8031-8525fff71fc6" ] }, "request": { "time_range": { "from": "2019-08-24T14:15:22Z", "to": "2019-08-24T14:15:22Z" }, "comparison_time_range": { "from": "2019-08-24T14:15:22Z", "to": "2019-08-24T14:15:22Z" }, "granularity": "minute", "identity": "stitch", "window_seconds": 0, "filters": {} }, "report_count": 0, "affected_visitors": 0, "reports_by_effective_directive": { "property1": 0, "property2": 0 }, "reports_by_disposition": { "property1": 0, "property2": 0 }, "series": [ { "timestamp": "2019-08-24T14:15:22Z", "report_count": 0, "reports_by_effective_directive": { "property1": 0, "property2": 0 }, "reports_by_disposition": { "property1": 0, "property2": 0 }, "affected_visitors": 0 } ]}