Redaction rules

Redaction rules: 5 operations of the ChaosDesk REST API.

Retrieves the collection of RedactionRule resources.

GET/api/redaction_rules

Responses

  • 200RedactionRule collection
  • 403Forbidden

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.

POST/api/redaction_rules

Request body application/json

namestringrequired
kind"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.
activeboolean
positioninteger

Responses

  • 201RedactionRule resource created
  • 400Invalid input
  • 403Forbidden
  • 422An 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.

GET/api/redaction_rules/{id}

Parameters

idstringpathrequired
RedactionRule identifier

Responses

  • 200RedactionRule resource
  • 403Forbidden
  • 404Not 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

namestring
kind"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.
activeboolean
positioninteger

Responses

  • 200RedactionRule resource updated
  • 400Invalid input
  • 403Forbidden
  • 404Not found
  • 422An 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 deleted
  • 403Forbidden
  • 404Not found

Example request

curl -X DELETE "https://yourcompany.chaosdesk.io/api/redaction_rules/{id}" \
  -H "Authorization: Bearer $CHAOSDESK_TOKEN" \
  -H "Accept: application/json"