Hello, Is it possible to get a run history for all...
# ask-community
v
Hello, Is it possible to get a run history for all the flows using the GraphQL query rather than looking at each flow?
a
Normally, you would need to query the API e.g.:
Copy code
query {
	flow_run{
    logs {
      message
      level
      info
      created
    }
  }
}
but you could also tackle it from the execution side by making sure that you collect the logs from your execution layer e.g. Kubernetes or ECS cluster
v
Thanks, @Anna Geller. Though I might not have been clear, I wanted to track the run time for each flow historically, i.e. flow X took 10 min today, 12 min yesterday and so on...
a
are you on Prefect Cloud or Server?
v
Server
a
with Server you have access to the underlying database, so you could write queries in Postgres to calculate and visualize this
v
Yes, I could, but I don't understand the underlying table structure, so if you can assist me or provide a pointer, it might help me. Thanks.
a
maybe someone from the community can chime in, I haven’t worked that much with Server’s database. What I would do is to go into the database and explore the tables to see which fields you may need to calculate the queries for that
v
Thanks, @Anna Geller. Let me explore