`ray.timeline()` but limited to the current job

ray.timeline() seems to dumps all timeline data for the cluster, but in the UI DOWNLOAD THE TRACE FILE only captures the traces associated to that one job. Is there a way to do the later programmatically?