UIPATH Orchestrator API: Upload Package



Hi community!!

I am dealing with the orchestrator API, both with Uipath HttpRequest dedicated activities, and also in python.

I am trying to perform “Upload Package” action, as follows (indicated in the API guide)(Python).

url = myOrchestratorURL + “/odata/Processes/UiPath.Server.Configuration.OData.UploadPackage”
headers = {
‘authorization’: "Bearer " + bearer,
‘content-type’: “multipart/form-data”,
multipart_form_data = {
‘Content-Disposition’ : ‘form-data; name=“file”; filename=“CHARO_A.1.0.6515.17422.nupkg”’,
‘Content-Type’ : ‘application/octet-stream’
response = requests.post(url, headers=headers , files=multipart_form_data)

And the result obtained is:

{“error”:{“code”:"",“message”:“You have to upload one package.”}}

At one point I guess I am missing something, but I can’t guess… Any help would be appreciated!

Thanks a lot and have a good day


I am having this exact same issue. Were you ever able to figure it out?


Is there a solution for upload packages ?


I was finally able to get this to work. I am using Powershell, and the specific line of relevance is:

$status = Invoke-RestMethod -Method Post -Headers $headers -Uri ($server+$uri) -Body $bodyLines -ContentType “multipart/form-data;boundary=$boundary” -Verbose


Thank You Dean,
You make us turn the right way.
We finnaly use postman to test and automate it in curl (impossible to do it in Python) :

curl -X POST https://{MY_URL}/odata/Processes/UiPath.Server.Configuration.OData.UploadPackage%28%29 -H 'Authorization: Bearer {MYTOKEN}’ -H ‘Cache-Control: no-cache’ -H ‘Postman-Token: c49b38fc-d701-4603-882a-a72e971db984’ -H ‘content-type: multipart/form-data’ -F ‘file=@/mnt/Dossier_Windows/mytest.nupkg’


Your welcome @GeneraliDevops :slight_smile:


Dean, Can you please explain a bit on $bodyLines and $boundary variables. ? What is supposed to be there in it. I have the same problem too. Cannot upload the packages via API call from C# or Powershell.


Hi @rmadrigal,

Are you able to fix this issue? I am also trying to post a package to orchestrator from my python program but stuck with the same error you mentioned. So any suggestion or help regarding to this would be great helpful.

Thank you in advance.



Can you please help me with this curl command? When i try to follow the curl command you posted am getting the following exception.

  • CategoryInfo : InvalidOperation: (System.Net.HttpWebRequest:HttpWebRequest) [Invoke-WebRequest], WebException
    • FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShell.Commands.InvokeWebRequestCommand

Thank you for your help in advance.