https://prefect.io logo
Title
m

Matthias

05/07/2020, 1:49 PM
Hi! How do I programmatically run a registered flow, so that I can see the execution in the UI (local, not cloud)?
πŸ‘€ 1
l

Laura Lorenz (she/her)

05/07/2020, 1:53 PM
Hi @Matthias, for programmatically starting ad-hoc flow runs (not on a schedule) you have a couple options; you can use the CLI, the GraphQL API directly, or the GraphQL API from Python. It’s kind of hidden under the tooltip but the code box with tabs at https://docs.prefect.io/orchestration/tutorial/first.html#run-flow-with-the-prefect-api shows examples of the syntax for the different styles
m

Matthias

05/07/2020, 1:54 PM
Thanks! Will check it out
πŸš€ 1
πŸ‘ 1
a

Avi A

05/07/2020, 2:05 PM
sounds like the FlowRunTask might also be relevant https://docs.prefect.io/api/latest/tasks/prefect.html#flowruntask