Pangolin icon

Pangolin

Interact with the Pangolin API

Actions142

Resource → Update a rule applied to a resource.

AI-generated

Summary

Update an existing rule applied to a specified resource by sending a POST request with the rule details in JSON format.

Inputs

  • Resource ID (required) — The unique identifier of the resource to which the rule is applied.
  • Rule ID (required) — The unique identifier of the rule to update.
  • Body (required) — A JSON object representing the new rule configuration, which typically includes fields like action, match type, value, priority, and enabled status.
  • Options — Optional settings, including 'Raw Response' to return the full API response instead of splitting arrays into individual items.

Output shape

A single JSON object representing the updated rule or the full response if Raw Response is selected.

If 'Raw Response' option is enabled, the complete response from the API is returned in one item; otherwise, the response is parsed and may be split into multiple items if it is an array.

Examples

Example 1: Update a rule applied to a resource with new matching criteria and action.

Set Resource ID and Rule ID parameters to identify the rule. Provide the updated rule details in the Body JSON, including fields like 'action', 'match', 'value', 'priority', and 'enabled'. Optionally enable Raw Response if the full API response is desired.

Discussion