https://prefect.io logo
Title
j

jack

03/22/2023, 8:45 PM
How can I get the flow run url from inside the
on_completion
flow callback?
1
Specifically, getting the
account_id
and
workspace_id
seem like the hard parts. From those I could construct the flow run url.
j

jack

03/22/2023, 10:23 PM
Can you point me to the correct attribute names within the
SettingsContext
that will provide
workspace_id
and
account_id
? I am not seeing them.
Okay here it is:
from prefect.context import get_settings_context()
get_settings_context().settings.PREFECT_API_URL
The `PREFECT_API_URL`contains within it the account_id and the workspace_id
🙌 1