https://prefect.io logo
Title
v

Vera Zabeida

02/25/2023, 2:23 PM
is there a way, programmatically, either with prefect cli or within python flow, to access the last time that this very flow successfully ran? I'd like to pass in as parameter the last successful run of my flow, so that I only fetch data from last successful run to now.. are there any examples of how to do this anywhere? TIA
c

Christopher Boyd

02/27/2023, 8:10 PM
You can probably use the rest / python API - a flow specifically would have associated flow_runs - https://docs.prefect.io/api-ref/rest-api-reference/#tag/Flow-Runs/operation/flow_run_history_flow_runs_history_post
🙌 1
I think this would only be really doable via REST api that I can tell, I don’t think the python API has any routes to access the flow run history
🙌 1