Delete a flow #5500
Answered
by
zanieb
neumann-nico
asked this question in
Q&A
Delete a flow
#5500
-
Hi there, Is there a way to delete a flow using Python? I am using prefect 1.0.0 from prefect import Flow
flow = Flow(...)
flow_id = flow.register(...) # flow is registered now e.g. in prefect cloud
flow.run(...)
# ...
delete_flow(flow_id) # is something like this possible? |
Beta Was this translation helpful? Give feedback.
Answered by
zanieb
Mar 1, 2022
Replies: 2 comments 5 replies
-
You can make a request to the GraphQL API
e.g. from prefect.client import Client
flow_id = "..."
client = Client()
client.graphql(
"""
mutation {
delete_flow(input: {flow_id: "%s"}) {
success
}
}
""" % flow_id
) |
Beta Was this translation helpful? Give feedback.
5 replies
Answer selected by
neumann-nico
-
@madkinsz thanks that works! |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You can make a request to the GraphQL API
e.g.