Marion

    Marion

    1 year ago
    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.
    Jenny

    Jenny

    1 year ago
    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.)
    Marion

    Marion

    1 year ago
    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
    Jenny

    Jenny

    1 year ago
    Ah I see - yes you would need to have the prefect library to register your flow with cloud (or to run it without cloud).
    Marion

    Marion

    1 year ago
    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
    Jenny

    Jenny

    1 year ago
    Oh great! Glad you managed to get what you needed working.
    Marion

    Marion

    1 year ago
    Thanks for your help and your pointers ^^.
    and your time 🙂
    Warsame Bashir

    Warsame Bashir

    1 year ago
    @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