Skip to content

Enhancement: flow run list filtering and max-limit options #4388

@FinderFees

Description

@FinderFees

Original post

Suggestion for an existing command: When calling the "m365 flow run list" command, the response contains every flow run available for that flow. For very active flows, this number could be in thousands or tens of thousands.

In a recent use case, I was needing to obtain only a list of flows that were in a "Running" state.

My hope is that this could be accomplished with the existing CLI by adding a "--status" option.

My familiarity with the APIs being used are still a bit limited but I have had some success adding a filter parameter to the end of the flow runs request: "/runs?api-version=2016-11-01&$filter=Status%20eq%20%27running%27`"

Perhaps there are other filters other than "status" that would be helpful?

Additionally, I think it would be terrific if we could limit the number of requests that it pulls back/serves up to a maximum amount. Perhaps it's not so much a specific count but the number of times a "nextlink" is followed? This feels related to the filtering request because "50 runs with a status of 'running'" is different than "50 most recent runs".

Wrapped up

Let's add 3 new options to the flow run list command.

Option Description
--status [status] Filter the results to only flow runs with a given status: Succeeded, Running, Failed or Cancelled. By default all flow runs are listed.
--triggerStartTime [triggerStartTime] Time indicating the inclusive start of a time range of flow runs to return. This should be defined as a valid ISO 8601 string (2021-12-16T18:28:48.6964197Z).
--triggerEndTime [triggerEndTime] Time indicating the exclusive end of a time range of flow runs to return. This should be defined as a valid ISO 8601 string (2021-12-16T18:28:48.6964197Z).

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions