Skip to content

Disabling Data Types

Enable or disable data types to control detection behavior without deleting them.


Endpoint

PUT /api/datatypes/:type/disable

Temporarily disable or re-enable a data type. Disabled types will not be detected by Shield.


Authentication

Requires API Key with Admin permission.


Path Parameters

Parameter Type Description
type string Data type identifier

Request Body

{
  "disable": true
}
Field Type Required Description
disable boolean Yes true to disable, false to enable

Response

Returns the updated data type object:

{
  "id": "employee_id",
  "type": "EMPLOYEE_ID",
  "name": "Employee ID",
  "disabled": true,
  "isGroupDataType": false,
  "updatedAt": 1704240000
}

Behavior

Disabling Data Types

When a data type is disabled:

  • Shield will not detect this type in scanned content
  • Obfuscations referencing this type will skip it
  • The type remains in the database and can be re-enabled
  • Activities logged before disabling remain unchanged

Disabling Group Data Types

When a group data type is disabled:

  • All member types are also disabled (cascade behavior)
  • Detection stops for the entire group
  • Re-enabling the group re-enables all members

Examples

Disable a Data Type

Temporarily disable a data type without deleting it.

DATATYPE_TYPE="EMPLOYEE_ID"

curl -X PUT "https://your-shield-host:8080/api/datatypes/$DATATYPE_TYPE/disable" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"disable": true}'
import requests

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

datatype_type = "EMPLOYEE_ID"

response = requests.put(
    f"{BASE_URL}/api/datatypes/{datatype_type}/disable",
    headers=HEADERS,
    json={"disable": True}
)

print(f"Data type disabled: {response.json()['disabled']}")
const axios = require('axios');

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

const datatypeType = 'EMPLOYEE_ID';

const response = await axios.put(
  `${BASE_URL}/api/datatypes/${datatypeType}/disable`,
  { disable: true },
  { headers: HEADERS }
);

console.log(`Data type disabled: ${response.data.disabled}`);
Re-enable a Data Type

Re-enable a previously disabled data type.

DATATYPE_TYPE="EMPLOYEE_ID"

curl -X PUT "https://your-shield-host:8080/api/datatypes/$DATATYPE_TYPE/disable" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"disable": false}'
import requests

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

datatype_type = "EMPLOYEE_ID"

response = requests.put(
    f"{BASE_URL}/api/datatypes/{datatype_type}/disable",
    headers=HEADERS,
    json={"disable": False}
)

print(f"Data type enabled: {not response.json()['disabled']}")
const axios = require('axios');

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

const datatypeType = 'EMPLOYEE_ID';

const response = await axios.put(
  `${BASE_URL}/api/datatypes/${datatypeType}/disable`,
  { disable: false },
  { headers: HEADERS }
);

console.log(`Data type enabled: ${!response.data.disabled}`);
Bulk Disable Multiple Types

Disable multiple data types programmatically.

import requests

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

# List of data type IDs to disable
datatype_ids = [
    "uuid-1",
    "uuid-2",
    "uuid-3"
]

for dt_id in datatype_ids:
    response = requests.put(
        f"{BASE_URL}/api/datatypes/{dt_id}/disable",
        headers=HEADERS,
        json={"disable": True}
    )
    print(f"Disabled: {response.json()['name']}")
const axios = require('axios');

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

// List of data type IDs to disable
const datatypeIds = [
  'uuid-1',
  'uuid-2',
  'uuid-3'
];

for (const dtId of datatypeIds) {
  const response = await axios.put(
    `${BASE_URL}/api/datatypes/${dtId}/disable`,
    { disable: true },
    { headers: HEADERS }
  );
  console.log(`Disabled: ${response.data.name}`);
}

Error Responses

Status Code Description
400 Invalid request body
401 Invalid or expired API key
403 Insufficient permissions
404 Data type not found

Use Cases

Built-in Data Types not being used

Disable built-in data types that are not required for your use cases.

Testing and Development

Temporarily disable detection during testing without removing the configuration.

Seasonal Data

Disable data types that are only relevant during certain periods.

Troubleshooting

Disable problematic regex patterns while investigating false positives.

Gradual Rollout

Disable types initially, then enable them after testing obfuscation configurations.