Execute Pipeline and Executable via REST API

Data Sync Pro exposes REST API endpoints that allow you to trigger pipeline and executable runs outside of the DSP UI. Any tool or system that can send an HTTP request can call them.

Calling via Postman

Prerequisites — An External Client App in the target org with OAuth enabled and Postman's callback URL allowed.
1
Open Postman and set the request method to POST.
2
Enter one endpoint URL from below:
Pipeline (Batch)
{org_base_url}/services/apexrest/pushtopics/execution/batch/pipeline/{pipelineApiName}
Executable (Batch)
{org_base_url}/services/apexrest/pushtopics/execution/batch/executable/{executableApiName}
Executable (Sync)
{org_base_url}/services/apexrest/pushtopics/execution/sync/executable/{executableApiName}
3
Under the Authorization tab, select OAuth 2.0 and configure:
Grant Type
Authorization Code (With PKCE)
Auth URL
{org_base_url}/services/oauth2/authorize
Access Token URL
{org_base_url}/services/oauth2/token
Client ID
Your External Client App's Consumer Key
Client Secret
Your External Client App's Consumer Secret
Code Challenge Method
SHA256
4
Click Get New Access Token and log in to Salesforce.
5
Once authentication is complete, click Proceed to save the token.
6
In Manage Access Tokens, click Use Token.
7
Under the Body tab, select raw › JSON, and enter the request body:
Pipeline

additionalRetrieveParameters is optional. Use null for no additional filtering, or a condition string (e.g. "CreatedDate = TODAY") to filter retrieved records.

json
{"additionalRetrieveParameters": null}
Executable

sourceRecordIds — an array of record IDs from the executable's source object.

json
{"sourceRecordIds": ["001XXXXXXXXXXXX"]}
8
Click Send.

Response

Batch (Pipeline and Executable) returns an execution record ID (e.g. "a0CDC000003DPrY2AW"). This means the batch job has been submitted, not that the run has finished. To check the run status, go to the corresponding Pipeline Execution or Execution record.

Sync (Executable) returns the sync result for each record directly in the response body. No execution records are generated. Example response:

json
[
    [
        {
            "targetId": "006XXXXXXXXXXXX",
            "success": true,
            "sourceId": "006XXXXXXXXXXXX",
            "skipped": false,
            "action": "insert"
        }
    ]
]

Calling via Apex

Prerequisite — A Named Credential pointing to the DSP org must be configured in the calling org.

Pipeline Example

apex
HttpRequest request = new HttpRequest();
request.setEndpoint('callout:Your_Named_Credential/services/apexrest/pushtopics/execution/batch/pipeline/YOUR_PIPELINE_API_NAME');
request.setMethod('POST');
request.setHeader('Content-Type', 'application/json');
request.setTimeout(60000);
request.setBody('{"additionalRetrieveParameters": null}');
Http http = new Http();
HttpResponse response = http.send(request);
System.debug('status: ' + response.getStatusCode());
System.debug('response: ' + response.getBody());

Executable Example

Note — The Sync API isn't available for org-to-org Apex callouts due to Salesforce's cross-org callout restrictions — use the Batch API instead. If synchronous execution is required, route the call through a proxy web service hosted outside Salesforce that relays the request and response to the DSP hosting service.
apex
HttpRequest request = new HttpRequest();
request.setEndpoint('callout:Your_Named_Credential/services/apexrest/pushtopics/execution/batch/executable/YOUR_EXECUTABLE_API_NAME');
request.setMethod('POST');
request.setHeader('Content-Type', 'application/json');
request.setTimeout(60000);
request.setBody('{"sourceRecordIds": ["001XXXXXXXXXXXX"]}');
Http http = new Http();
HttpResponse response = http.send(request);
System.debug('status: ' + response.getStatusCode());
System.debug('response: ' + response.getBody());
Replace
Your_Named_Credential
Named Credential pointing to the DSP org
YOUR_PIPELINE_API_NAME
The Pipeline's API name
YOUR_EXECUTABLE_API_NAME
The Executable's API name
001XXXXXXXXXXXX
Actual source record IDs in the DSP org