Create Scanning Rule

POST {{baseUrl}}/api/v2/sensitive-data-scanner/config/rules

Create a scanning rule in a sensitive data scanner group, ordered last. The posted rule MUST include a group relationship. It MUST include either a standardpattern relationship or a regex attribute, but not both. If includedattributes is empty or missing, we will scan all attributes except excluded_attributes. If both are missing, we will scan the whole event.

Request Body

{"data"=>{"type"=>"sensitive_data_scanner_rule", "attributes"=>{"description"=>"<string>", "excluded_namespaces"=>["<string>", "<string>"], "is_enabled"=>"<boolean>", "name"=>"<string>", "namespaces"=>["<string>", "<string>"], "pattern"=>"<string>", "tags"=>["<string>", "<string>"], "text_replacement"=>{"number_of_chars"=>"<long>", "replacement_string"=>"<string>", "type"=>"none"}}, "relationships"=>{"group"=>{"data"=>{"id"=>"<string>", "type"=>"sensitive_data_scanner_group"}}, "standard_pattern"=>{"data"=>{"id"=>"<string>", "type"=>"sensitive_data_scanner_standard_pattern"}}}}, "meta"=>{"version"=>"<long>"}}

HEADERS

KeyDatatypeRequiredDescription
Content-Typestring
Acceptstring

RESPONSES

status: OK

{&quot;data&quot;:{&quot;attributes&quot;:{&quot;description&quot;:&quot;\u003cstring\u003e&quot;,&quot;excluded_namespaces&quot;:[&quot;\u003cstring\u003e&quot;,&quot;\u003cstring\u003e&quot;],&quot;is_enabled&quot;:&quot;\u003cboolean\u003e&quot;,&quot;name&quot;:&quot;\u003cstring\u003e&quot;,&quot;namespaces&quot;:[&quot;\u003cstring\u003e&quot;,&quot;\u003cstring\u003e&quot;],&quot;pattern&quot;:&quot;\u003cstring\u003e&quot;,&quot;tags&quot;:[&quot;\u003cstring\u003e&quot;,&quot;\u003cstring\u003e&quot;],&quot;text_replacement&quot;:{&quot;number_of_chars&quot;:&quot;\u003clong\u003e&quot;,&quot;replacement_string&quot;:&quot;\u003cstring\u003e&quot;,&quot;type&quot;:&quot;none&quot;}},&quot;id&quot;:&quot;\u003cstring\u003e&quot;,&quot;relationships&quot;:{&quot;group&quot;:{&quot;data&quot;:{&quot;id&quot;:&quot;\u003cstring\u003e&quot;,&quot;type&quot;:&quot;sensitive_data_scanner_group&quot;}},&quot;standard_pattern&quot;:{&quot;data&quot;:{&quot;id&quot;:&quot;\u003cstring\u003e&quot;,&quot;type&quot;:&quot;sensitive_data_scanner_standard_pattern&quot;}}},&quot;type&quot;:&quot;sensitive_data_scanner_rule&quot;},&quot;meta&quot;:{&quot;version&quot;:&quot;\u003clong\u003e&quot;}}