Hi everyone nice to meet you all. I have to run Pr...
# ask-community
m
Hi everyone nice to meet you all. I have to run Prefect's flows from my API, I was wondering if you had a REST endpoint to run a flow, instead of using the prefect pylib.
j
Hi @Marion - we don't have a REST API but there are a few options for running a flow. (Note that those options also require you to register your flow with Cloud or Server.)
m
Hello @Jenny, thanks for the quick response. I'm not really well versed in the Prefect world. But if I understand correctly I could download a python client to create GraphQL request to a run a registered flow (with Cloud) ? The reason I'm asking is I feel downloading the entire prefect library, just to launch a simple flow, is a bit overkill, for my use case
j
Ah I see - yes you would need to have the prefect library to register your flow with cloud (or to run it without cloud).
m
Actually, I successfully created a mutation request to Prefect/graphql end point with the library Requests in python. With the help of this doc page https://docs.prefect.io/orchestration/concepts/api.html#authentication
j
Oh great! Glad you managed to get what you needed working.
m
Thanks for your help and your pointers ^^.
and your time 🙂
👍 1
w
@Marion can you share an example of what you did here. Facing similar need to execute a flow in a REST fashion and looking for a workaround