What’s the easiest way to fetch the logs of a flow...
# ask-community
t
What’s the easiest way to fetch the logs of a flow run, with the intention of sending them to another application? I’ve searched far and wide, but there doesn’t seem to be any docs or conclusive discussion on this 🤔
s
There are a few ways you can stream logs to a specific file, you can use this method to help send to another application as well.
r
@Tuomas Heiskanen You might also find the 'Read Logs' API endpoint useful: https://app.prefect.cloud/api/docs#tag/Logs/operation/read_logs_api_accounts__account_id__workspaces__workspace_id__logs_filter_post Although that link is in the Prefect Cloud docs, the format of the API call is the same if you are running your own Prefect server. The only difference in that case is the endpoint would just be
<http://127.0.0.1:4200/api/logs/filter>
instead of including the account and workspace IDs.
t
Thank you very much Ryan, that was exactly what I was looking for 🙏
👍 1