CentralCSP
APIReports

Export the report breakdown

Streams the whole breakdown as CSV, with the same filters as the breakdown endpoint and no pagination.

Requires the viewer role on the website and the report type's plan feature.

GET
/v1/workspaces/{workspaceId}/websites/{websiteId}/reports/{type}/top/export

Authorization

headerAuthorizationBearer <JWT>

An OpenID Connect access token from signing in to CentralCSP, acting as the signed-in user.

Path Parameters

workspaceId*string

The workspace's id.

websiteId*string

The website's id.

type*string

Which kind of report to read. A website only collects the types its plan includes and its settings allow.

Value in"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"

Query Parameters

range*string

How far back to look, counted from now. Reports are kept for 90 days, so 90d is the widest range available.

Default"7d"
Value in"24h""7d""30d""90d"
sort?string

Order rows by report count, last seen or first seen. Views without a first-seen date ignore firstSeen and keep their default order.

Value in"count""lastSeen""firstSeen"
order?string

Sort direction. Defaults to newest or largest first, and oldest first for firstSeen.

Value in"asc""desc"
search?string

Match part of a URL or origin in the row.

Lengthlength <= 1024
directive?string

Only rows for this CSP directive.

Lengthlength <= 255
browser?string

Only rows reported by this browser.

Lengthlength <= 255
disposition?string

enforce 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.

Value in"enforce""report""reporting"
connection?string

Only Connection-Allowlist rows for this connection: the blocked URL's scheme, or webrtc.

Value in"https""http""webrtc"
phase?string

Only rows for this network error phase, such as dns, connection or application.

Lengthlength <= 255

Response Body

A UTF-8 CSV file of the filtered breakdown.

response?stringtext/csv
Example Request
curl -X GET 'https://api.centralcsp.com/v1/workspaces/01936b7a-6f2e-7c31-9a4d-2f8e1c5b7d90/websites/01936b7a-6f2e-7c31-9a4d-2f8e1c5b7d90/reports/csp-violation/top/export?range=24h'
Example Response
"string"