VMware Cloud Community
AhmedBenAbid
Contributor
Contributor

HTTP 500 error when trying to Import vRO workflow via Webservice

HTTP 500 error when trying to Import vRO workflow via Webservice

Hello everyone,

I'm new to the VMWare ecosystem and I'm currently using vRO 7.5, and trying to automate certain tasks via its Webserice using Python.

I was able to retrieve informations about workflows and others objects and even export them as zip files.

But when I try to import a workflow, I keep getting a HTTP 500 error with no further explanation.

The documentation about importing objects isn't detailed enough, apart from saying that the HTTP POST should follow the RFC 2387 standard.

In the other hand, the API reference shows that we need also to provide the categoryId when making the POST request.

On the internet, I can't find if someone had the same issue, but I found an example of workflow import using Powershell. (https://code.vmware.com/samples/804/perl-python-and-powershell-samples-to-execute-vro-workflow-over-...)

That script prepare the HTTP requests to include the file and the categoryId.

I tried to do the same using Python, but no luck as I always get an HTTP 500 when I POST to that URL.

Here an example of the HTTP Request, does anyone know how to solve this issue ?

POST /vco/api/workflows/ HTTP/1.1
Host: REDACTED
User-Agent: python-requests/2.22.0
Accept-Encoding: gzip, deflate
Accept: */*
Connection: keep-alive
Content-Length: 5634
Content-Type: multipart/form-data; boundary=2d5cffe22f92f89a824123fe6eea67c7
Authorization: Basic REDACTED


--2d5cffe22f92f89a824123fe6eea67c7
Content-Disposition: form-data; name="categoryId"

ff8080816db5174f016dd8f060fa1ab3
--2d5cffe22f92f89a824123fe6eea67c7
Content-Disposition: form-data; name="overwrite"

true
--2d5cffe22f92f89a824123fe6eea67c7
Content-Disposition: form-data; name="file"
Content-Type: Content-Type: application/octet-stream

PK\x03\x04...
--2d5cffe22f92f89a824123fe6eea67c7--

reply: 'HTTP/1.1 500
...

0 Kudos
1 Reply
iiliev
VMware Employee
VMware Employee

Hi,

Error code 500 is internal server error. Usually, details about such errors can be found in vRO server log files under /var/log/vco/app-server/ folder (the main vRO server log file is named server.log). Could you check what is logged there around the time you try to import the workflow and receive error 500?

0 Kudos