Hello,
I ran into the same issue. Thanks for this post, it works very well.
To add on this topic since documentation is missing on this:
More information here: Search exposures recursively via CLI - #2 by stephan
In order to create an exposure group with continuous import and searching recursively, I wrote this for loop that goes through a dictionnary (containing all path and filter information):
for key, array in ExpGrpDic.items():
file_engine_watch_path_abs = array[0]
file_engine_filter = array[1]
gainref_path = array[2]
newid = cs.rtp.exposure_group_add_new(project_uid, session_uid)
cs.rtp.exposure_group_update_value(project_uid=project_uid, session_uid=session_uid, exp_group_id=int(newid), name='file_engine_watch_path_abs', value=file_engine_watch_path_abs)
cs.rtp.exposure_group_update_value(project_uid=project_uid, session_uid=session_uid, exp_group_id=int(newid), name='file_engine_filter', value=file_engine_filter)
cs.rtp.exposure_group_update_value(project_uid=project_uid, session_uid=session_uid, exp_group_id=int(newid), name='gainref_path', value=gainref_path)
cs.rtp.exposure_group_update_value(project_uid=project_uid, session_uid=session_uid, exp_group_id=int(newid), name='file_engine_recursive', value=True)
cs.rtp.exposure_group_update_value(project_uid=project_uid, session_uid=session_uid, exp_group_id=int(newid), name='file_engine_enable', value=True)
print(f"Exposure group {newid} created:\nPath: {file_engine_watch_path_abs}\nType: {file_engine_filter}\nGain: {gainref_path}")