Hi, I have been struggling to extract the logs for flow runs from prefect cloud using the api. In prefect 1 I was able to do this with the graph ql query below. How can I do this in prefect 2?
✅ 1
Nick Coy
09/30/2022, 6:34 PM
Copy code
query {
flow_run (where:{
_and: [
{start_time: {_gte:"%s"}},
{start_time: {_lt:"%s"}}
]
}){
flow {
id
name
}
scheduled_start_time
start_time
name
id
version
task_runs {
id
task {
name
}
start_time
end_time
logs {
message
level
id
task_run_id
}
}
}
}
Bring your towel and join one of the fastest growing data communities. Welcome to our second-generation open source orchestration platform, a completely rethought approach to dataflow automation.