younifyd
Menu

Create Page Shield Policy

Create page shield policy.

POST/organizations/{organizationId}/zones/{zoneId}/page-shield/policies

Use it in a workflow

  1. Add a step and choose the Salesforce Commerce Cloud connector.
  2. Pick the Create Page Shield Policy action (under Zones (Data API)).
  3. Fill in the fields below, then reference the result from later steps as {{createPageShieldPolicy.response.data}}.

Request

Path parameters

zoneIdstringrequired
organizationIdstringrequired

An identifier for the organization the request is being made by

Request body

Enter the body as JSON in the step's Body field.

actionstring

Action taken when expression matches allow or log.

One ofallowlog

descriptionstring

Description for the policy.

enabledboolean

Enable/disable the policy.

expressionstring

Expression of the policy.

valuestring

Policy to be applied.

json
{
  "action": "allow",
  "description": "Allow scripts from trusted CDN sources",
  "enabled": true,
  "expression": "http.request.uri.path contains \"/trusted-cdn/\"",
  "value": "script-src"
}

Response

Returns 200 with an object. Read it in later steps with {{createPageShieldPolicy.response.data.<field>}}.

dataobject

Page shield policy response.

actionstring

Action taken when expression matches allow or log.

One ofallowlog

descriptionstring

Description for the policy.

enabledboolean

Enable/disable the policy.

expressionstring

Expression of the policy.

valuestring

Policy to be applied.

idstring

Policy ID

json
{
  "data": {
    "action": "allow",
    "description": "Allow scripts from trusted CDN sources",
    "enabled": true,
    "expression": "http.request.uri.path contains \"/trusted-cdn/\"",
    "value": "script-src",
    "id": "policy_1234567890abcdef"
  }
}

Need more? See the Salesforce Commerce Cloud guide for connection setup and behaviour shared by every action.

Create Page Shield Policy — Salesforce Commerce Cloud — Documentation