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)