Hey guys - is their a way to list all registered f...
# prefect-community
v
Hey guys - is their a way to list all registered flows? I couldn’t find a way in the API docs
s
you can use the graphql API, e.g. to get the flow id by the flow name
Copy code
import prefect

client = prefect.Client()

flow_id = client.graphql('''query {
  flow(where: {_and: [
    {name: {_eq: "flow name"}}    ,
    {archived: {_eq: false}}
  ]}) {
    id
  }
}''').data.flow[0].id
💯 2
👍 1