VMware Cloud Community
DexG83
Enthusiast
Enthusiast

vRO 7.5 REST-API - Response Code 401

Hello,

in my vRO 7.5 Environment I have an Issue running Workflows via REST API.

I used swagger to check the API but also in swagger I get 401 Response Code.

The user that opens swagger in IE (or Firefox) is member of the Orchestrator Admins group and running workflows in the java client works.

Response Code

401

Response Headers

{
  "cache-control": "private",
  "content-length": "3299",
  "content-type": "text/html;charset=ISO-8859-1",
  "date": "Tue, 09 Jun 2020 13:01:27 GMT",
  "expires": "Thu, 01 Jan 1970 00:00:00 GMT",
  "strict-transport-security": "max-age=31536000 ; includeSubDomains",
  "www-authenticate": "Bearer realm=\"vCO Authentication\"",
  "custom realm=\"vco authentication": "Custom realm=\"vCO Authentication\"",
  "x-content-type-options": "nosniff",
  "x-frame-options": "DENY",
  "x-xss-protection": "1; mode=block"
}

I restarted the Appliance several times, checked the certificates and Authentication Provider.

What can I do?

Reply
0 Kudos
3 Replies
iiliev
VMware Employee
VMware Employee

Hi,

Java client does not use the vRO REST API.

Please show how does your request look like (how do you call the REST API to execute the workflow, what HTTP headers do you pass, what is the request body/payload, etc.). Status 401 means there is an issue with authentication of your REST call.

Reply
0 Kudos
DexG83
Enthusiast
Enthusiast

Hi,

to test I use swagger to list all workflows:

https://orchestrator-test.testdom:8281/vco/api/docs/index.html#!/workflow-controller/getAllWorkflows...

Request URL

https://orchestrator-test.testdom:8281/vco/api/workflows?maxResult=2&startIndex=0&queryCount=false

To run the Workflow from the external system the request looks as follows:

set HttpReq = Server.CreateObject("MSXML2.ServerXMLHTTP.6.0")

HttpReq.open "POST",”https://orchestrator-test.testdom:8281/vco/api/workflows/4b1219e8-d467-42da-a8ca-ec7a63cd798d/execut...",false,userid,password

httpreq.setRequestHeader "Content-type","application/xml;charset=UTF-8"

httpreq.setRequestHeader "Accept","application/json" 

strsend="<execution-context xmlns=""http://www.vmware.com/vco""><parameters>"

strsend=strsend&"<parameter type=""string"" name=""toAddress"" scope=""local""><string>somebody@domain.com</string></parameter>"

strsend=strsend&"<parameter type=""string"" name=""ccAddress"" scope=""local""><string>someware@domain.com</string></parameter>"

strsend=strsend&"<parameter type=""string"" name=""topic"" scope=""local""><string>Mailtopic</string></parameter>"

strsend=strsend&"<parameter type=""string"" name=""contentBody"" scope=""local""><string>Hello World</string></parameter> </parameters> </execution-context>"

HttpReq.Send strsend

many thanks!

Reply
0 Kudos
iiliev
VMware Employee
VMware Employee

I'm not very familiar with Microsoft XML services.

Could you check if you get the same authentication error if you make REST requests using clients like curl, postman, etc.?

Reply
0 Kudos