Skip to main content

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

ParameterTypeRequiredDescriptionExample
datasourceIdStringYesData source ID. Call Retrieve Data Source List to query the ID.ds-xxxyyy
enableBooleanYesWhether 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

ParameterTypeDescription
successBooleanIndicates whether the setting is successful.
requestIdStringRequest 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.