Quantcast
Channel: VMware Communities : Discussion List - vRealize Orchestrator
Viewing all articles
Browse latest Browse all 6251

Invoke vCO workflow via PowerShell fails after 5.5.2 upgrade

$
0
0

Hello,

 

After upgrading vCO to 5.5.2 I am having problems executing workflows from PowerShell using REST. I read there are many changes on the vCO REST API on this new version so I am thinking the upgrade has something to do with the problem. 

 

$username = 'XXXXXX

$upassword = 'XXXXXX'

#create Headers for vCO REST call

$auth = $username + ':' + $upassword

$Encoded = [System.Text.Encoding]::UTF8.GetBytes($auth)

$EncodedPassword = [System.Convert]::ToBase64String($Encoded)

$headers = @{"Authorization"="Basic $($EncodedPassword)";}

$value = "nothing"

$body = '<execution-context xmlns="http://www.vmware.com/vco">

                <parameters>

                    <parameter name="arg_in_0" type="string">

                        <string>'+$value+'</string>

                    </parameter>

                </parameters>

            </execution-context>'

 

$ret =Invoke-WebRequest -uri https://vcoserver:8281/api/workflows/0049f373-8dc4-4c1b-ae67-15e7bc106fa4/executions/ -Headers $headers -Body $body -ContentType "application/xml" -Method Post

 

I get the following error:

Invoke-WebRequest : HTTP Status 401 - Full authentication is required to access this resource

type Status report

message Full authentication is required to access this resource

description This request requires HTTP authentication.

VMware vFabric tc Runtime 2.9.5.SR1/7.0.50.C.RELEASE

 

Thanks,

 

Juan.


Viewing all articles
Browse latest Browse all 6251

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>