Build a recommended Connection-Allowlist
Builds a Connection-Allowlist from the website's Connection-Allowlist reports over the period (last 7 days by default, up to 30), starting from your policy or (response-origin). Each blocked destination is added as its origin; browser extensions and noise are left out.
Send reportingEndpoints as the Reporting-Endpoints header with it, and deploy it as Connection-Allowlist-Report-Only first: only Chromium-based browsers support it. Anyone can send reports to the endpoint, so review new destinations before deploying.
Limited to 10 requests a minute for each person, after which it answers 429 with a Retry-After header.
Requires the viewer role on the website and the report:connection-allowlist 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.
application/json- body
The period of reports to learn from and, optionally, the allowlist to start from.
range?stringHow far back to read reports, counted from now. Defaults to 7d and is ignored when from and to are given.
"24h""7d""14d""30d"from?stringStart of a calendar period instead of range. It must fall within the last 30 days and comes with to.
date-timeto?stringEnd of the calendar period, exclusive. It comes with from.
date-timepolicy?stringThe allowlist to start from, as a Connection-Allowlist header value without the header name. Leave it out to start from (response-origin).
1 <= length <= 16384A Connection-Allowlist built from the website's reports, ready to deploy.
application/json- response
policy*stringThe recommended Connection-Allowlist header value, without the header name. It reports to the centralcsp group.
reportingEndpoints*stringThe Reporting-Endpoints header value to send alongside it, without the header name. It declares the centralcsp group.
curl -X POST 'https://api.centralcsp.com/v1/workspaces/01936b7a-6f2e-7c31-9a4d-2f8e1c5b7d90/websites/01936b7a-6f2e-7c31-9a4d-2f8e1c5b7d90/connection-allowlist/recommended-policy' \ -H 'Content-Type: application/json' \ -d '{}'{ "policy": "(response-origin \"https://api.example.com\" \"https://*.cdn.example.com\"); report-to=centralcsp", "reportingEndpoints": "centralcsp=\"https://e0123456789abcdef0123.report.centralcsp.com\", default=\"https://e0123456789abcdef0123.report.centralcsp.com\""}Build a recommended Permissions-Policy POST
Builds a Permissions-Policy from the website's Permissions-Policy reports over the period (last 7 days by default, up to 30), starting from your policy or...
Export individual reports GET
Streams individual reports as CSV, newest first, with the same filters as the list endpoint and no pagination. The columns depend on the report type.