Sorry if my question wasn’t clear, here are the steps that I did:
- PUT to http://<knime_server_address>/knime/rest/v4/repository/Test without any body to create a workflow-group called Test. This step worked and I am able to see the folder on the server.
- PUT to http://<knime_server_address>/knime/rest/v4/repository/Test:data with the body being the .zip file contents to upload all the files for the workflow group. This 2nd call is what fails with HTTP 500 and the message “The workflow group at Test cannot be overwritten by a file”.
I used the following python code to PUT the zip file contents to the server.
with open(‘Zipped_file.zip’, ‘rb’) as data:
response = requests.put(upload_workflow_url, auth=(‘user’, ‘pass’), data=data)
Note: The zip file contents are:
Archive: Zipped_file.zip
Length Date Time Name
'--------- ---------- ----- ----
0 02-14-2021 11:07 Sales_Attr_MF_V3/workflowset.meta
4345 02-14-2021 11:07 Sales_Attr_MF_V3/Metainfo/Evaluation_Table.table
2704 02-14-2021 11:07 Sales_Attr_MF_V3/Metainfo/QA_Test_Thresholds.table
2753 02-14-2021 11:07 Sales_Attr_MF_V3/Metainfo/Modelling_Configuration.table
0 02-14-2021 11:07 Sales_Attr_MF_V3/Metainfo/workflowset.meta
…
The list is long but I have just shown the first part of the output from “unzip -l” to show the directory structure at the top-level.
I also tried sending the contents of the .zip file without doing the first PUT call (i.e. without pre-creating the workflow-group) but that ends up creating a file called Test with the .zip contents instead of a folder.
Finally, I tried sending the contents of the .zip file in the first PUT call itself (without :data) and got a HTTP 415 error saying “No data must be sent when creating workflow groups”.
Thanks.