Get the Policy Snapshot of a Job Session
Returns the scan policy settings applied to a specific scan job session.
Required Editions
| Available in: Lightning Experience |
| Available in: Enterprise, Performance, Unlimited, and Developer editions with the Salesforce Shield or Data Detect Licenses. |
Example
curl https://MyDomainName.my.salesforce.com/services/data/v68.0/datadetect/policies/jobsession/snapshot -H "Authorization: Bearer token" -H "Content-Type: application/json" -d @policy.json -X POSTRequest Body Schema
| jobSessionId | string | required | ID of the job session to get the scan policy of |
Example REQUEST BODY
{
"jobSessionId": "0YYxx0000000001AAA"
}
Example 200 RESPONSE BODY
{
"jobSessionId": "0YYxx0000000001AAA",
"policyId": "0XXxx0000000001AAA",
"name": "Contact PII Scan",
"description": "Scans Contact records for emails and phone numbers",
"scanType": "PatternMatch",
"startTime": "2026-08-01T00:00:00.000Z",
"endTime": "2026-08-31T23:59:59.000Z",
"dataDetectPolicyObjects": [
{
"id": "0ZAxx0000000001AAA",
"name": "Contact",
"objectReference": "Contact",
"dataDetectPolicyId": "0XXxx0000000001AAA",
"dataDetectPolicyObjFields": [
{
"id": "0ZBxx0000000001AAA",
"name": "Email",
"fieldName": "Email",
"dataDetectPolicyObjectId": "0ZAxx0000000001AAA"
},
{
"id": "0ZBxx0000000002AAA",
"name": "Phone",
"fieldName": "Phone",
"dataDetectPolicyObjectId": "0ZAxx0000000001AAA"
}
]
}
],
"dataDetPlcySstvDataCatgs": [
{
"id": "0ZCxx0000000001AAA",
"name": "EMAIL",
"dataCategory": "EMAIL",
"dataDetectPolicyId": "0XXxx0000000001AAA"
}
],
"dataDetPlcyMdatScanCrits": [
{
"id": "0ZDxx0000000001AAA",
"name": "Exclude system fields",
"criteria": "FieldName",
"type": "Exclude",
"value": "SystemModstamp",
"dataDetectPolicyId": "0XXxx0000000001AAA"
}
],
"dataDetPlcyDataSrchExpss": [
{
"id": "0ZExx0000000001AAA",
"name": "Employee ID",
"expression": "EMP-[0-9]{6}",
"isCaseSensitive": false,
"isKeywordSearch": false,
"dataDetectPolicyId": "0XXxx0000000001AAA"
}
],
"dataDetPlcySrchExpsDicts": [
{
"id": "0ZFxx0000000001AAA",
"name": "Project Codenames",
"expressionDictionary": ["Falcon", "Orion", "Atlas"],
"fileName": "codenames.csv",
"fileType": "csv",
"isCaseSensitive": false,
"delimiter": ",",
"expressionCount": 3,
"dataDetectPolicyId": "0XXxx0000000001AAA"
}
]
}
Did this article solve your issue?
Let us know so we can improve!
