CentralCSP
APIReports

Export reported policies

Streams every matching policy as CSV, with no pagination.

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

GET
/v1/workspaces/{workspaceId}/websites/{websiteId}/reports/{type}/policies/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

search?string

Match part of the policy text.

Lengthlength <= 4096

Response Body

A UTF-8 CSV file of the reported policies.

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/policies/export'
Example Response
"string"