How to get workflow execution input in batch?

Hi team, was wondering if there’s an easier method to get workflow execution input in batch. Checked documentation and forums and couldn’t find an endpoint for this.

As of now using the dotnet-sdk we are calling: ListWorkflowExecutionsAsync and GetWorkflowExecutionHistoryAsync for each workflow.

we are calling: ListWorkflowExecutionsAsync and GetWorkflowExecutionHistoryAsync for each workflow

this is currently the way to go. whats the specific use case where you need the inputs? archival could help so you don’t put extra pressure on your visibility store at possible high rates as well as make sure you dont lose completed execution data due to it being removed at namespace retention period

I would recommend to use an external DB for this. Your workflows (or an interceptor if you want to make it generic) can have an activity at the beginning that saves its input into the DB.

Note, we have high-level forms of this that may be easier to use if you must use these calls. You can call myClient.ListWorkflowsAsync(myQuery) on the client which returns an async iterator of executions. Then you can call myClient.GetWorkflowHandle(myExec.Id, myExec.RunId).FetchHistoryAsync() to get history (or .FetchHistoryEventsAsync() for an async iterator of events since you only want the first). These all wrap the lower-level calls you listed.