Skip to content

Deleting Obfuscations

Delete obfuscations that are no longer needed.


Endpoint

DELETE /api/obfuscations/:id

Permanently deletes an obfuscation configuration.


Authentication

Requires API Key with Policy Definition permission.


Path Parameters

Parameter Type Description
id UUID Obfuscation ID to delete

Response

Returns 204 No Content on successful deletion.


Behavior

When deleting an obfuscation:

  • Referenced by rules - Rules using this obfuscation will fail to apply masking
  • Permanent deletion - Cannot be undone via API
  • No cascade - Referenced data types and mask formats are not affected

Examples

Delete an Obfuscation

Delete an obfuscation by its ID.

OBFUSCATION_ID="550e8400-e29b-41d4-a716-446655440000"

curl -X DELETE "https://your-shield-host:8080/api/obfuscations/$OBFUSCATION_ID" \
  -H "Authorization: Bearer YOUR_API_KEY"
import requests

BASE_URL = "https://your-shield-host:8080"
HEADERS = {"Authorization": "Bearer YOUR_API_KEY"}

obfuscation_id = "550e8400-e29b-41d4-a716-446655440000"

response = requests.delete(f"{BASE_URL}/api/obfuscations/{obfuscation_id}", headers=HEADERS)

if response.status_code == 204:
    print("Obfuscation deleted successfully")
const axios = require('axios');

const BASE_URL = 'https://your-shield-host:8080';
const HEADERS = { 'Authorization': 'Bearer YOUR_API_KEY' };

const obfuscationId = '550e8400-e29b-41d4-a716-446655440000';

const response = await axios.delete(`${BASE_URL}/api/obfuscations/${obfuscationId}`, { headers: HEADERS });

if (response.status === 204) {
  console.log('Obfuscation deleted successfully');
}

Error Responses

Status Code Description
401 Invalid or expired API key
403 Insufficient permissions (requires Policy Definition)
404 Obfuscation not found

Important Notes

  • Check dependencies first - Before deleting, verify no rules reference this obfuscation
  • Update rules - Modify or delete rules that use this obfuscation
  • Cannot be restored - Deleted obfuscations cannot be recovered via API