Working with Swagger to execute a workflow. When the body = {}, the workflow succeeds with a 202 response. Using the example in Swagger and other posts I have found, I expected: '{"parameters": [{"name":"vmName","type":"string","value":{"text":"testVm1"}}]}' to work. A 400 response code is returned. Any help would be appreciated.
Switched the body to xml in my java code and got it work with a 202 response code. Would be nice to know how to do it in JSON.
String xml = new StringBuilder()
.append('<execution-context xmlns="http://www.vmware.com/vco">\n' +
' <parameters>\n' +
' <parameter name="vmName" type="string">\n' +
' <string>' + vmName + '</string>\n' +
' </parameter>\n' +
' </parameters>\n' +
'</execution-context>').toString()
Just ran a WF from the GUI, the payload was:
{
"parameters": [
{
"name": "projectID",
"type": "string",
"value": {
"string": {
"value": "str1"
}
}
},
{
"name": "category",
"type": "string",
"value": {
"string": {
"value": "str2"
}
}
}
],
"profilerOptions": {
"enabled": true,
"debuggerEnabled": false,
"tokenReplayEnabled": false
}
}