Run Data Flow Commands from Web Functions
DataFlowService
To run Data Flow commands against the InVision database from Web Functions, use the DataFlowService.
Two new supported API's:
GetRunningDataFlowsAsync()
Example
public sealed class DataFlowGetRunning : WebFunction
{
public async Task<IActionResult> Run(HttpRequest request)
{
var res = await this.DataFlowService.GetRunningDataFlowsAsync();
return Ok(JsonSerializer.Serialize(res));
}
}
StopDataFlowAsync("<task-id>")
Example
public sealed class DataFlowStop : WebFunction
{
public async Task<IActionResult> Run(HttpRequest request)
{
var taskId = GetRequestQueryString(request, "taskId");
await this.DataFlowService.StopDataFlowAsync(taskId);
return Ok();
}
}