Update an inventory rule
Changes a rule or turns it off with enabled: false. Only the fields you send are changed, and reconciliation runs again afterwards. A script this rule has decided keeps that decision until its hash changes or someone reviews it, so changing action does not revisit it.
Requires the manager role on the website and the compliance plan feature.
An OpenID Connect access token issued by Keycloak, acting as the signed-in user.
In: header
Path Parameters
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Only the fields you send are changed.
New display name.
1 <= length <= 255New pattern to match script URLs against.
1 <= length <= 1024How urlPattern is read. glob uses * wildcards and is the default. regex is a regular expression, kept for existing integrations. Patterns are matched safely, and one with too many unbounded repetitions is rejected.
Value in
- "glob"
- "regex"
What happens to a script the rule matches. justify records it as reviewed and allowed, and is the default. exclude takes it out of PCI scope instead, for the software a visitor's own browser injects - an extension, a security product, a translating proxy - which the site never asked for. An excluded script leaves the review queue and the compliance figures entirely and raises no unjustified-script alert, so keep the pattern narrow: anything the site really does load belongs in the inventory.
Value in
- "justify"
- "exclude"
New text recorded on matching scripts.
1 <= length <= 4096Tags to apply to every script this rule matches.
items <= 50Turn the rule on or off.
Rules are tried from the lowest value up, and the first match wins. Put the most specific rules first.
0 <= valueResponse Body
application/json
curl -X PATCH "https://example.com/v1/workspaces/string/websites/string/compliance/rules/string" \ -H "Content-Type: application/json" \ -d '{}'{ "id": "string", "workspaceId": "string", "websiteId": "string", "name": "Stripe", "urlPattern": "https://*.stripe.com/*", "patternType": "glob", "action": "justify", "justification": "string", "tagIds": [ "string" ], "enabled": true, "sortOrder": 0, "createdAt": "2019-08-24T14:15:22Z", "updatedAt": "2019-08-24T14:15:22Z"}