Redaction rules
Redaction rules: 5 operations of the ChaosDesk REST API.
- GET
/api/redaction_rulesRetrieves the collection of RedactionRule resources. - POST
/api/redaction_rulesCreates a RedactionRule resource. - GET
/api/redaction_rules/{id}Retrieves a RedactionRule resource. - PATCH
/api/redaction_rules/{id}Updates the RedactionRule resource. - DELETE
/api/redaction_rules/{id}Removes the RedactionRule resource.
Retrieves the collection of RedactionRule resources.
Responses
200RedactionRule collection403Forbidden
Example request
curl -X GET "https://yourcompany.chaosdesk.io/api/redaction_rules" \
-H "Authorization: Bearer $CHAOSDESK_TOKEN" \
-H "Accept: application/json" Creates a RedactionRule resource.
Request body application/json
namestringrequiredkind"pin" | "card_number" | "sa_id" | "passport" | "iban" | "eu_national_id" | "us_ssn" | "jmbg" | "oib" | "custom"patternstring | null- PCRE without delimiters; group 1 (if any) is the part that is masked. Null for built-in kinds.
activebooleanpositioninteger
Responses
201RedactionRule resource created400Invalid input403Forbidden422An error occurred
Example request
curl -X POST "https://yourcompany.chaosdesk.io/api/redaction_rules" \
-H "Authorization: Bearer $CHAOSDESK_TOKEN" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{"name":"string"}' Retrieves a RedactionRule resource.
Parameters
idstringpathrequired- RedactionRule identifier
Responses
200RedactionRule resource403Forbidden404Not found
Example request
curl -X GET "https://yourcompany.chaosdesk.io/api/redaction_rules/{id}" \
-H "Authorization: Bearer $CHAOSDESK_TOKEN" \
-H "Accept: application/json" Updates the RedactionRule resource.
PATCH/api/redaction_rules/{id}
Parameters
idstringpathrequired- RedactionRule identifier
Request body application/merge-patch+json
namestringkind"pin" | "card_number" | "sa_id" | "passport" | "iban" | "eu_national_id" | "us_ssn" | "jmbg" | "oib" | "custom"patternstring | null- PCRE without delimiters; group 1 (if any) is the part that is masked. Null for built-in kinds.
activebooleanpositioninteger
Responses
200RedactionRule resource updated400Invalid input403Forbidden404Not found422An error occurred
Example request
curl -X PATCH "https://yourcompany.chaosdesk.io/api/redaction_rules/{id}" \
-H "Authorization: Bearer $CHAOSDESK_TOKEN" \
-H "Accept: application/json" \
-H "Content-Type: application/merge-patch+json" \
-d '{"name":"string","kind":0}' Removes the RedactionRule resource.
DELETE/api/redaction_rules/{id}
Parameters
idstringpathrequired- RedactionRule identifier
Responses
204RedactionRule resource deleted403Forbidden404Not found
Example request
curl -X DELETE "https://yourcompany.chaosdesk.io/api/redaction_rules/{id}" \
-H "Authorization: Bearer $CHAOSDESK_TOKEN" \
-H "Accept: application/json"