Get the report breakdown
Groups the website's reports of this type and ranks the groups by volume, biggest first. Pass sort to rank by last or first seen instead. What a row is grouped by depends on the report type, for example the directive and blocked origin for csp-violation, or the script origin for csp-hash. Pass a row's key to a drill-down view to see what is behind it.
Requires the viewer role on the website and the report type's plan feature.
AuthorizationBearer <JWT>An OpenID Connect access token from signing in to CentralCSP, acting as the signed-in user.
workspaceId*stringThe workspace's id.
websiteId*stringThe website's id.
type*stringWhich kind of report to read. A website only collects the types its plan includes and its settings allow.
"csp-violation""csp-hash""integrity-violation""permissions-policy-violation""potential-permissions-policy-violation""document-policy-violation""connection-allowlist""intervention""deprecation""crash""coop""coep""network-error"range*stringHow far back to look, counted from now. Reports are kept for 90 days, so 90d is the widest range available.
"7d""24h""7d""30d""90d"sort?stringOrder rows by report count, last seen or first seen. Views without a first-seen date ignore firstSeen and keep their default order.
"count""lastSeen""firstSeen"order?stringSort direction. Defaults to newest or largest first, and oldest first for firstSeen.
"asc""desc"search?stringMatch part of a URL or origin in the row.
length <= 1024directive?stringOnly rows for this CSP directive.
length <= 255browser?stringOnly rows reported by this browser.
length <= 255disposition?stringenforce means the browser blocked what the report describes. report (or reporting for COOP and COEP) means the policy was report-only and nothing was blocked.
"enforce""report""reporting"connection?stringOnly Connection-Allowlist rows for this connection: the blocked URL's scheme, or webrtc.
"https""http""webrtc"phase?stringOnly rows for this network error phase, such as dns, connection or application.
length <= 255cursor?stringThe nextCursor of the previous page.
limit*|How many rows to return, from 1 to 200.
1 <= value <= 20050A page of breakdown rows.
application/json- response
data*array<>The breakdown rows on this page.
pagination*Where this page sits in the full result set.
curl -X GET 'https://api.centralcsp.com/v1/workspaces/01936b7a-6f2e-7c31-9a4d-2f8e1c5b7d90/websites/01936b7a-6f2e-7c31-9a4d-2f8e1c5b7d90/reports/csp-violation/top?range=24h&limit=50'{ "data": [ { "key": "string", "dimensions": {}, "collected": {}, "count": 0, "lastSeen": "2019-08-24T14:15:22Z" } ], "pagination": { "nextCursor": "string", "hasMore": true, "total": 0 }}