<@ULVA73B9P> how can I fetch results to my local c...
# ask-marvin
s
@Marvin how can I fetch results to my local computer from a flow run that was run using a Prefect Cloud managed work pool?
m
To fetch results from a Prefect Cloud-managed flow run to your local computer, you may need to use the Prefect Cloud REST API. This API is used for communicating data from Prefect clients to Prefect Cloud or a local Prefect server for orchestration and monitoring. Begin by accessing the Prefect Cloud API interactive documentation available at Prefect Cloud REST API Documentation to learn more about how to fetch data from a flow run. Additionally, code examples on how to use the Prefect Python client to interact with flow runs can be found in the Using the Prefect Client guide. From there, you can use the code snippets provided to query and retrieve data on flow runs, including potentially the results of these runs if they have been stored in a manner that allows for API retrieval. For thorough guidance, review the Prefect documentation regarding this topic by starting with the files linked above, and extend your exploration by searching for specific use cases depicted in the documentation examples. Remember that to use the API and the client effectively, you will likely need to authenticate with your Prefect Cloud account, so make sure you follow the instructions for proper authentication and access control.
s
My takeaway from some testing is: if you're testing locally, just call the entrypoint directly if you can. Still would be nice to know how to access the results stored on prefect cloud, however.