CentralCSP
APICompliance

Refresh the script inventory

Refreshes the website's script inventory from the latest reports, for when you need the result right away after a change. The inventory also refreshes on its own, and this call answers before the refresh completes.

Limited to 1 request every 30 seconds for each website, after which it answers 429 with a Retry-After header.

Requires the manager role on the website and the compliance plan feature.

POST
/v1/workspaces/{workspaceId}/websites/{websiteId}/compliance/refresh

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.

Response Body

Whether the inventory refresh has started.

application/json
  1. response
queued*boolean

true when the refresh has started and completes within seconds. false when an immediate refresh is unavailable, in which case the inventory refreshes automatically later.

Example Request
curl -X POST 'https://api.centralcsp.com/v1/workspaces/01936b7a-6f2e-7c31-9a4d-2f8e1c5b7d90/websites/01936b7a-6f2e-7c31-9a4d-2f8e1c5b7d90/compliance/refresh'
Example Response
{  "queued": true}