Accessing IDs and Logs via API in Prefect

Hi Prefect Team,

I am currently working on integrating Prefect into our workflow and would like to inquire about accessing specific data programmatically. Specifically, I am interested in retrieving the following IDs:

  • Flow IDs
  • Flow Run IDs
  • Task Run IDs

Additionally, I would like to know if it is possible to access logs through the API.

Could you please provide guidance on how to achieve this using the Prefect API? Any relevant documentation or examples would be greatly appreciated.

Thank you in advance :slight_smile:

hi @JAYASHRI_V - feel free join us in the Prefect Slack community!

lots of questions like this are answered over there or @Marvin can grab the docs for you!

to directly answer your question, you can retrieve all of those things with a python client or directly using the REST endpoints it calls

Hi! To find out what I can do, say @marvin display help.