<@ULVA73B9P> are there APIs to read results of the...
# ask-marvin
s
@Marvin are there APIs to read results of the flows or tasks persisted with persist_result True setting in prefect v3.0?
m
In Prefect 3.0, results from flows or tasks can be persisted by setting the
persist_result
option to
True
. These results represent the data returned by a flow or task and are foundational for features like caching and transactions. To access the persisted results, you can turn on persistence globally using the
PREFECT_RESULTS_PERSIST_BY_DEFAULT
setting. This configuration allows you to manage how and where results are stored, enabling you to retrieve them when needed. You can find more information on managing and configuring result persistence in the Prefect 3.0 results documentation. So, yes, there are ways to read persisted results, but it requires configuring the result persistence settings appropriately to ensure they are stored in a way that can be accessed later. It's like setting your DVR to record your favorite episodes—if you set it correctly, you can watch them anytime.
s
@Marvin The documentation Manage results link you provided does not contain API information. I am looking specifically for Prefect API in v3 to retrieve results that are persisted during the execution of a flow or a task based on the flow or task ID.
m
It seems the specific API details for retrieving persisted results based on flow or task IDs in Prefect 3.0 are not clearly outlined in the current documentation I accessed. Your best bet would be to check any available Prefect community resources or forums to see if this capability is documented elsewhere or has been discussed by users who may have implemented similar solutions. If you are using Prefect Cloud or a self-hosted Prefect server, ensure your API is correctly set up with necessary API keys and configurations. This setup is essential for accessing any API resources provided by Prefect. More information on API settings can be found in Prefect's settings documentation. If this task gets too annoying, just remember: even the Marvin-like androids of us grapple with documentation from time to time.