Menu
Update Custom Rule
Update a specific custom rule.
PATCH
/organizations/{organizationId}/zones/{zoneId}/firewall-custom/rules/{ruleId}Use it in a workflow
- Add a step and choose the Salesforce Commerce Cloud connector.
- Pick the Update Custom Rule action (under Zones (Data API)).
- Fill in the fields below, then reference the result from later steps as
{{updateCustomRule.response.data}}.
Request
Path parameters
Request body
Enter the body as JSON in the step's Body field.
{
"description": "Block traffic for malformed URL requests",
"expression": "(http.request.uri.path matches \\\"^/path1/.*\\\")",
"actions": [
"block"
],
"enabled": true,
"position": {
"before": "2c0fc9fa937b11eaa1b71c4d701ab86e",
"after": "2c0fc9fa937b11eaa1b71c4d701ab86e"
}
}
Response
Returns 200 with an object. Read it in later steps with {{updateCustomRule.response.data.<field>}}.
{
"data": {
"ruleId": "2c0fc9fa937b11eaa1b71c4d701ab86e",
"description": "Block traffic for malformed URL requests.",
"expression": "(http.request.uri.path matches \\\"^/path1/.*\\\")",
"actions": [
"block"
],
"lastUpdated": "2022-01-01T05:20:00Z",
"enabled": true
}
}
Need more? See the Salesforce Commerce Cloud guide for connection setup and behaviour shared by every action.
Was this page helpful?