<@ULVA73B9P> How do I see the version of the deplo...
# ask-marvin
g
@Marvin How do I see the version of the deployment a flow run use to run
m
To determine the version of the deployment a flow run used, the Prefect documentation does not have a straightforward answer. However, it implies interacting with deployments and flow runs might involve using the Prefect client to access metadata about flow runs and perhaps even versioning details associated with those runs. While the specifics regarding how to see the version are not explicitly mentioned in the search results, you could use the Prefect client to interact with the API and retrieve details about a flow run, including potentially its associated deployment version. Here's a snippet that hints at how you might start to interact with the API to obtain flow run metadata:
Copy code
python
from prefect import get_client

async with get_client() as client:
    flow_run = client.read_flow_run(flow_run_id)
    print(f"Current state of the flow run: {flow_run.state}")
Unfortunately, the excerpt does not provide complete information about fetching the deployment version directly. However, the flow run object fetched through the client might contain information about its version or the version of the related deployment. You might want to explore the attributes of the flow run object or check other endpoints provided by the Prefect client that deal with metadata and versioning. For more details, you can check the documentation on deployments and versioning.