I agree that AnalyzeCli is the way to go.
I've been able to use the following code in a Transform/Generate Data node to run AnalyzeCli from inside Analyze.
import subprocess
p = subprocess.Popen([analyzeCli, '-f', 'json', "runs"], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
The analyzeCli variable either references the installed analyzeCli executable, or the analyzeCli.bat file in Windows.
The output in this example is a JSON list of JSON objects in this form.
{
"scheduledTaskName" : "The Schedule Name",
"status" : "COMPLETED",
"duration" : 2031,
"startTime" : "2023-01-06T23:04:10.699Z",
"modifiedByName" : "username here"
}
Ernest
------------------------------
Ernest Jones
Precisely Software Inc.
PEARL RIVER NY
------------------------------