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
Key | Datatype | Required | Description |
---|---|---|---|
Content-Type | string | ||
Accept | string |
RESPONSES
status: OK
{"data":{"attributes":{"description":"\u003cstring\u003e","excluded_namespaces":["\u003cstring\u003e","\u003cstring\u003e"],"is_enabled":"\u003cboolean\u003e","name":"\u003cstring\u003e","namespaces":["\u003cstring\u003e","\u003cstring\u003e"],"pattern":"\u003cstring\u003e","tags":["\u003cstring\u003e","\u003cstring\u003e"],"text_replacement":{"number_of_chars":"\u003clong\u003e","replacement_string":"\u003cstring\u003e","type":"none"}},"id":"\u003cstring\u003e","relationships":{"group":{"data":{"id":"\u003cstring\u003e","type":"sensitive_data_scanner_group"}},"standard_pattern":{"data":{"id":"\u003cstring\u003e","type":"sensitive_data_scanner_standard_pattern"}}},"type":"sensitive_data_scanner_rule"},"meta":{"version":"\u003clong\u003e"}}