Hi all! Is there a way of wiping (runs, logs..) hi...
# ask-community
g
Hi all! Is there a way of wiping (runs, logs..) history regularly? I wouldn't like to keep data older than 7 days
a
Are you on Prefect Cloud? if so, on which plan?
g
I'm using Server
a
in that case, you would need to build some script that would regularly purge this data from the database. If you were on Cloud, this would be configurable.
g
that's fine, but is there a way of doing this through Prefect API? would you have a snippet on that?
a
I quickly browsed through the API and I believe there is no mutation for it I’m aware of. So afaik, you would have to handle it on a database level.
g
got it, thanks!
a
@Gabriel Milan my previous message was specifically about logs. But to delete specific flow runs, you could use the
delete_flow_run
mutation
šŸ™Œ 1
āœ… 1
k
This might help.
upvote 2