Create a custom rulepost https://{hostname}/appsec/v1/configs/{configId}/custom-rulesAll products Creates a new custom rule.Path ParamsconfigIdint64requiredA unique identifier for each configuration.Query ParamsaccountSwitchKeystringFor customers who manage more than one account, this runs the operation from another account. The Identity and Access Management API provides a list of available account switch keys.Body Paramsconditionsarray of objectsContains the details about the condition that triggers the custom rule.conditionsADD objectdescriptionstringThe custom rule description.effectiveTimePeriodobjectThe time period during which the custom rule is active.effectiveTimePeriod objectidintegerUniquely identifies the rule.inspectRequestbooleanWhether to inspect the HTTP request for unstructured custom rules.truefalseinspectResponsebooleanWhether to inspect the HTTP response for unstructured custom rules.truefalseloggingOptionsarray of objectsThe specific conditions to be logged.loggingOptionsADD objectmetadatastringThe metadata you provided for unstructured custom rules.namestringrequiredThe custom rule name.operationstringenumrequiredSpecify AND logic to require all conditions, or OR logic to require at least one condition to match.ANDORAllowed:ANDORruleActivatedbooleanWhether the rule is active in the configuration.truefalsesamplingRateinteger0 to 100The portion of traffic to sample, expressed as a percent.stagingOnlybooleanDefaults to falseWhether to show traffic from only the staging network, or all traffic. The default setting is false and only shows in the response when true.truetruefalsestructuredbooleanrequiredWhether you created the rule with the structured custom rule builder or free-form XML. This needs to be true.truefalsetagarray of stringsThe list of labels you assigned to the custom rule.tagADD stringversionintegerThe custom rule version.Response 200Responds with the newly created rule.Updated about 1 month ago