<@ULVA73B9P> Is there a way to pull the average du...
# marvin-in-the-wild
a
@Marvin Is there a way to pull the average duration of a deployment from the prefect cloud api?
m
You want to retrieve the average duration of a deployment from the Prefect Cloud API. Let's find out how to do this. First, I need to know which major version of Prefect you are using (2.x or 3.x). Could you please specify that?
a
@Marvin 3
m
I couldn't find direct information on retrieving the average duration of a deployment. I'll now check any related Github issues to see if this has been discussed. Hang on! I couldn't find specific information on retrieving the average deployment duration from either the Prefect docs or GitHub issues. You might need to calculate the average duration manually by fetching deployment run data through the Prefect API and computing the average locally. For this: 1. Obtain all deployment runs and their durations using the Prefect API. 2. Calculate the average duration from the retrieved data. For detailed API usage, refer to the Prefect 3.x API documentation. If you face specific issues while implementing this, feel free to ask!