Update Sensitive Data Categories in a Scan Policy
Replaces a scan policy’s sensitive data categories with the specified list.
Required Editions
| Available in: Lightning Experience |
| Available in: Enterprise, Performance, Unlimited, and Developer editions with the Salesforce Shield or Data Detect Licenses. |
The categories sent in the request must match how they are gotten from Get Available Sensitive Data Categories.
Example
curl https://MyDomainName.my.salesforce.com/services/data/v68.0/datadetect/policies/{policyId}/sensitivecategories -H "Authorization: Bearer token" -H "Content-Type: application/json" -d @policy.json -X PUTRequest Body Schema
| categories | array | required | A list of categories to add to the policy. The names of the sensitive data
categories. Must be an exact match. For example, Email
Address |
Example REQUEST BODY
{
"categories": [
"Email Address",
"Driver's License"
]
}
Example 200 SUCCESS RESPONSE BODY
{
"status": "SUCCESS",
"results": [
{ "id": "0DCRM0000004Cfh0AE", "status": "SUCCESS" },
{ "id": "0DCRM0000004Cfi0AE", "status": "SUCCESS" }
]
}
Example 200 PARTIAL_SUCCESS RESPONSE BODY
{
"status": "PARTIAL_SUCCESS",
"results": [
{ "id": "0DCRM0000004Cff0AE", "status": "SUCCESS" },
{ "id": "Not A Real Category", "status": "FAILED",
"message": "Not A Real Category isn't a recognized sensitive data category." }
]
}
Example 400 RESPONSE BODY
{
"errorCode": "REQUIRED_FIELD_MISSING", "message": "categories must contain at least one value."
}
Example 403 RESPONSE BODY
{
"errorCode": "FUNCTIONALITY_NOT_ENABLED", "message": "DataDetect headless API is not enabled for this org."
}
Example 404 RESPONSE BODY
{
"errorCode": "RESOURCE_NOT_FOUND", "message": "No policy exists for the supplied id."
}
Did this article solve your issue?
Let us know so we can improve!
