Hey there ! Starting to try out GraphQL (first tim...
# prefect-server
s
Hey there ! Starting to try out GraphQL (first time šŸ˜¬) to clean up old flow runs in order to reduce the size of Postgre Database. I manage to get flow run ids before a given date as well as deleting a single flow run from its id using
delete_flow_run
but is there a way to delete multiple flow runs at once ? Thanks !
a
There is not. I think the only way would be to delete the entire project
p
@Sylvain Hazard I made a script, let me share that with you
upvote 1
this one will delete all flow runs older than 30 days, change 30 to whatever is good for you
s
That's amazing, thank you so much !
a
@Marvin archive ā€œDelete old flow runs older than 30 days using GraphQL API to clean up Server resourcesā€ in server