Loading
Connect in real time with the Trailblazer Community in Slack Open BetaRead More
Set Up and Maintain Your Salesforce Organization
Get a List of Scannable Objects in a Scan Policy

Get a List of Scannable Objects in a Scan Policy

Returns a list of all scannable objects that can be added to a scan policy.

Required Editions

Available in: Lightning Experience
Available in: Enterprise, Performance, Unlimited, and Developer editions with the Salesforce Shield or Data Detect Licenses.

Objects that you don't have access to aren't returned. Results are returned in pages, and the server sets the page size. To get the next page, pass the nextPageToken value from the response as the pageToken query parameter. When nextPageToken isn't returned, you've reached the last page.

Example

curl  https://MyDomainName.my.salesforce.com/services/data/v68.0/datadetect/policies/{policyId}/objects/scannable -H "Authorization: Bearer token"  -X GET

Query Parameters

pageToken string optional A paging cursor. To get the next page, pass back the nextPageToken from the previous response exactly as you received it. Defaults to the first page
Example
Example REQUEST BODY

None required

Example
Example 200 RESPONSE BODY
{
  "objects": [
    { "apiName": "Contact", "label": "Contact", "fieldCount": 12 },
    { "apiName": "Lead", "label": "Lead", "fieldCount": 8 }
  ],
  "nextPageToken": "NTA"
}

Example
Example 400 RESPONSE BODY
{
	"errorCode": "INVALID_API_INPUT", "message": "The page token is invalid or does not belong to this request."
}
Example
Example 403 RESPONSE BODY
{
	"errorCode": "INSUFFICIENT_ACCESS", "message": "You do not have access to DataDetect."
}
Example
Example 404 RESPONSE BODY
{
	"errorCode": "RESOURCE_NOT_FOUND", "message": "No policy exists for the supplied id."
}
Example
Example 500 RESPONSE BODY
{
	"errorCode": "UNKNOWN_EXCEPTION", "message": "An unexpected error occurred while listing scannable objects."
}
 
Loading
Salesforce Help | Article