CentralCSP
APIInventory Scripts

Get an inventory script

Returns one script of the inventory with its review status, justification, current hash, origin and tags, as the list shows it. A retired script is returned too.

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

GET
/v1/workspaces/{workspaceId}/websites/{websiteId}/compliance/scripts/{inventoryId}

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.

inventoryId*string

The inventory script's id.

Response Body

A script seen on a payment page.

application/json
  1. response
id*string
websiteId*string
subresourceUrl*string

URL of the script.

status*InventoryStatus

unreviewed means nobody has looked at it yet. justified means it is authorized at its current hash. needs_review means it was justified but its contents have since changed. unauthorized means a person or a reject rule decided it does not belong on a payment page. excluded means an exclude rule took it out of PCI scope, for example a script a browser extension injects.

Value in"unreviewed""justified""needs_review""unauthorized""excluded"
justification*|

Why the script is allowed to run, when it has been justified.

originId*|

The inventory origin this script belongs to.

origin*|

The origin serving the script.

tags*array<>

Tags applied to this script, by hand or by a rule.

justifiedHash*|

The hash the justification was given for.

currentHash*|

The hash last reported by browsers. When it differs from justifiedHash the script needs review again.

ruleId*|

The rule that decided this script, or null when a person did.

justifiedBy*|

Identifier of the person who justified it, or null once their account is deleted.

justifiedByName*|

Name of the person who justified it, kept after their account is deleted.

justifiedByEmail*|

Email of the person who justified it.

justifiedByDeleted*boolean

true when the person who justified it can no longer be named.

justifiedAt*|

When it was justified.

unauthorizedReason*|

Why the script was judged not to belong.

unauthorizedBy*|

Identifier of the person who marked it unauthorized, or null once their account is deleted.

unauthorizedByName*|

Name of the person who marked it unauthorized, kept after their account is deleted.

unauthorizedByEmail*|

Email of the person who marked it unauthorized.

unauthorizedByDeleted*boolean

true when the person who marked it unauthorized can no longer be named.

unauthorizedAt*|

When it was marked unauthorized.

retiredAt*|

When the script left the PCI scope, or null while it is still seen on a payment page. Retired scripts are listed only with includeRetired, and return automatically if the script reappears.

firstSeen*|

When the script was first reported on a payment page.

lastSeen*|

When it was last reported.

createdAt*string
Formatdate-time
updatedAt*string
Formatdate-time
Example Request
curl -X GET 'https://api.centralcsp.com/v1/workspaces/01936b7a-6f2e-7c31-9a4d-2f8e1c5b7d90/websites/01936b7a-6f2e-7c31-9a4d-2f8e1c5b7d90/compliance/scripts/01936b7a-6f2e-7c31-9a4d-2f8e1c5b7d90'
Example Response
{  "id": "string",  "websiteId": "string",  "subresourceUrl": "https://js.stripe.com/v3/",  "status": "unreviewed",  "justification": "string",  "originId": "string",  "origin": "https://js.stripe.com",  "tags": [    {      "id": "string",      "name": "string",      "color": "slate"    }  ],  "justifiedHash": "string",  "currentHash": "string",  "ruleId": "string",  "justifiedBy": "string",  "justifiedByName": "Dana Reed",  "justifiedByEmail": "dana@example.com",  "justifiedByDeleted": true,  "justifiedAt": "2019-08-24T14:15:22Z",  "unauthorizedReason": "string",  "unauthorizedBy": "string",  "unauthorizedByName": "Dana Reed",  "unauthorizedByEmail": "dana@example.com",  "unauthorizedByDeleted": true,  "unauthorizedAt": "2019-08-24T14:15:22Z",  "retiredAt": "2019-08-24T14:15:22Z",  "firstSeen": "2019-08-24T14:15:22Z",  "lastSeen": "2019-08-24T14:15:22Z",  "createdAt": "2019-08-24T14:15:22Z",  "updatedAt": "2019-08-24T14:15:22Z"}