CentralCSP
APIReports

Get the report breakdown

Groups the website's reports for this type and ranks them by volume, so the biggest problems come first. What each row is grouped by depends on the report type: for csp-violation it is the directive and the blocked origin, for csp-hash the origin scripts are served from, for integrity-violation the script. Every row carries an opaque key. Pass it to a drill-down view to see what is behind that row.

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

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

Authorization

AuthorizationBearer <token>

An OpenID Connect access token issued by Keycloak, acting as the signed-in user.

In: header

Path Parameters

workspaceId*string
websiteId*string
type*string

Query Parameters

range*|||

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

Default"7d"
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?||

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.

phase?string

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

Lengthlength <= 255
cursor?string

The nextCursor of the previous page.

limit*|

How many rows to return, from 1 to 200.

Range1 <= value <= 200
Default50

Response Body

application/json

curl -X GET "https://api-next.centralcsp.com/v1/workspaces/string/websites/string/reports/string/top?range=7d&limit=50"
{  "data": [    {      "key": "string",      "dimensions": {},      "collected": {},      "count": 0,      "lastSeen": "2019-08-24T14:15:22Z"    }  ],  "pagination": {    "nextCursor": "string",    "hasMore": true,    "total": 0  }}