https://prefect.io logo
m

Marion

01/26/2021, 12:11 PM
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

Jenny

01/26/2021, 2:28 PM
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

Marion

01/26/2021, 2:41 PM
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

Jenny

01/26/2021, 3:50 PM
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

Marion

01/26/2021, 4:08 PM
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

Jenny

01/26/2021, 4:08 PM
Oh great! Glad you managed to get what you needed working.
m

Marion

01/26/2021, 4:09 PM
Thanks for your help and your pointers ^^.
and your time 🙂
👍 1
w

Warsame Bashir

03/14/2021, 11:27 PM
@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
5 Views