Hi,
I am trying to automate the import of bots into the productive control room using python. But I always get the error 'Can\'t read the uploaded file part'. Manually it is working. My code is the following:
headers = { "content-type":"multipart/form-data", "X-Authorization", "token that I generated"}
with open('C:\\...\\TESTAPI.zip', 'rb') as f:
payload = MultipartEncoder(fields={'upload': ('TESTAPI.zip', f, 'application/zip'),
'actionIfExisting': 'OVERWRITE', 'publicWorkspace': 'False'})
url = "https://" + control-room-server + "/v2/blm/import"
response = requests.request("POST", url, headers=headers, data=payload,
verify=path\\zertificate.cer")
Any suggestions? With Postman this import API is also not working.
Thanks in advance,
Henriette