CentralCSP
APIInventory Scripts

List a script's history

Returns the full history of one script, newest first: when it was first seen, every time its contents changed, and every decision made about it, with who made it. Entries are never changed or removed, and the history is kept after the script stops being reported.

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

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

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.

Query Parameters

cursor?string

The nextCursor of the previous page. Omit it to start from the beginning. A cursor encodes a position and is not meant to be built by hand.

limit*|

How many items to return, from 1 to 200.

Range1 <= value <= 200
Default50

Response Body

A page of history entries.

application/json
  1. response
data*array<>

The history entries on this page.

pagination*

Where this page sits in the full result set.

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/ledger?limit=50'
Example Response
{  "data": [    {      "id": "string",      "subresourceUrl": "string",      "event": "hash_changed",      "hash": "string",      "justification": "string",      "reason": "string",      "ruleId": "string",      "actorId": "string",      "actorName": "Dana Reed",      "actorEmail": "dana@example.com",      "actorDeleted": true,      "createdAt": "2019-08-24T14:15:22Z"    }  ],  "pagination": {    "nextCursor": "string",    "hasMore": true,    "total": 0  }}