/_api/SP.WorkflowServices.WorkflowSubscriptionService.Current/EnumerateSubscriptions() /_api/SP.WorkflowServices.WorkflowInstanceService.Current/EnumerateInstancesForSite() /_api/SP.WorkflowServices.WorkflowSubscriptionService.Current/EnumerateSubscriptionsByList('listguid')
I figured some of this out with this msdn document and then sort of RESTifying it. Using that I've been able to get the subscriptions and instances using REST endpoints.
I want to also get all the definitions from my site, as far as I know that is the only place where it tells if it is a list or site workflow and some other publishing info that I need.
Here is the same documentatio for the WorkflowDeploymentService, and I tried following the same model with endpoints like:
and so on without success. Does anybody know if there is a REST endpoint for this? I can do it with JSOM,
var context = SP.ClientContext.get_current(); var web = _context.get_web(); var serviceManager = SP.WorkflowServices.WorkflowServicesManager.newObject(context, web); var _eploymentService = serviceManager.getWorkflowDeploymentService(); var definitions = deploymentService.enumerateDefinitions(); context.load(definitions); context.executeQueryAsync();
But I would prefer to use REST since the rest of what I'm trying to do is using that approach.