How does one get the current flow run url programm...
# ask-community
s
How does one get the current flow run url programmatically?
1
j
you mean the URL for the flow run in the dashboard?
if so:
Copy code
from prefect import flow
from prefect.runtime import flow_run
from prefect.settings import PREFECT_UI_URL


@flow(log_prints=True)
def my_flow():
    ui_url = PREFECT_UI_URL.value()
    print(f"{ui_url}/flow-runs/flow-run/{flow_run.id}")


my_flow()
👍 1
🙌 1
s
Cheers Jake