Add a new custom rule to a configuration

These steps show you how to modify a configuration, add a new custom rule, and activate the new configuration version.

  1. Run List configurations and select a configId.

  2. Run List configuration versions and select a versionNumber.

  3. Run Get configuration version details.

  4. You cannot edit the configuration version if it's ACTIVE on staging or production servers. To create a new version, run Clone a configuration version.

  5. Run Create a custom rule Note the ruleId in the response.

  6. Run Get a custom rule for a configuration.

  7. Modify the response object.

  8. Make a PUT request to /appsec/v1/configs/{configId}/custom-rules/{ruleId}.

  9. Run List security policies and select a policyId.

  10. Make a PUT request with a single-member object containing the specified action to /appsec/v1/configs/{configId}/versions/1/security-policies/{policyId}/custom-rules/{ruleId}.

  11. Create an Activation object.

  12. Make a POST request to /appsec/v1/activations to activate the configuration version.

  13. Run Get activation status to check the activation status.