Apex API
Use the global pushtopics.ExecutionService class to start batch executions of Executables and Pipelines directly from Apex. To start executions from an external system or another org, use the REST API instead.
apex
global class ExecutionService {
global static pushtopics__Execution__c executeExecutableByApiName(String apiName)
global static pushtopics__Execution__c executeExecutableByApiName(String apiName, List<Id> recordIds)
global static pushtopics__PipelineExecution__c executePipelineByApiName(String pipelineApiName)
}Each method starts a batch execution and returns the execution record created for the run.
Examples
apex
// Run an Executable
pushtopics.ExecutionService.executeExecutableByApiName('Account.RollupSummaries');
// Run an Executable for specific records only
pushtopics.ExecutionService.executeExecutableByApiName(
'Account.RollupSummaries', new List<Id>{ '001xx0000000001AAA' });
// Run a Pipeline
pushtopics__PipelineExecution__c pipelineExecution =
pushtopics.ExecutionService.executePipelineByApiName('Opportunity.Batches');