I'm looking at example_watch_folder.py and it's not clear from the example how you submit multiple datasets to a library. In the example, the first submit returns a libset [] with only a single entry and then proceeds to iterate through each dataset in the libset in the following section:

data = {}

   data['folder_id'] = library_folder_id

   data['file_type'] = 'auto'

   data['dbkey'] = ''

   data['upload_option'] = 'upload_paths'

   

data['filesystem_paths'] = fullpath

   data['create_type'] = 'file'

   libset = submit(api_key, api_url + "libraries/%s/contents" % library_id, data, return_formatted = False)

   time.sleep(5)

   for ds in libset:

       if 'id' in ds:

                        wf_data = {}

                        wf_data['workflow_id'] = workflow['id']

                        wf_data['history'] = "%s - %s" % (fname, workflow['name'])

                        wf_data['ds_map'] = {}

                        for step_id, ds_in in workflow['inputs'].iteritems():

                            wf_data['ds_map'][step_id] = {'src':'ld', 'id':ds['id']}

                        res = submit( api_key, api_url + 'workflows', wf_data, return_formatted=False)




Rob Leclerc, PhD
P: (US) +1-(917)-873-3037
P: (Shanghai) +86-1-(861)-612-5469
Personal Email: rob.leclerc@aya.yale.edu