Set Sensitive Data Protection Switch
Use this API to enable or disable sensitive data protection for a specified data source. Turn the switch on before applying sensitive column policies that should take effect for that data source.
Request URL: /openapi/v1/sensitiveData/datasource/switch
Request Method: POST
Request Parameters
| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
| datasourceId | String | Yes | Data source ID. Call Retrieve Data Source List to query the ID. | ds-xxxyyy |
| enable | Boolean | Yes | Whether to enable sensitive data protection. true enables it, and false disables it. | true |
Request Example
For request headers, signatures, and POST request body construction, see OpenAPI API Documentation.
{
"datasourceId": "ds-xxxyyy",
"enable": true
}
Response Parameters
| Parameter | Type | Description |
|---|---|---|
| success | Boolean | Indicates whether the setting is successful. |
| requestId | String | Request ID. |
Successful Response Example
{
"success": true,
"requestId": "Hf4s0WFI-BHIAtCAnEHFg2RWdHAi2PET"
}
Result
A successful response confirms that the protection switch was updated. When enable is set to true, NineData applies sensitive data protection based on the configured column recognition results and masking algorithms.