Hi All,
I am not able to execute the workflow with REST api.
POST https://<<HOST>>:<<PORT>>/api/workflows/94dd5f20-c190-4023-a0a7-1589c46f3792/executions/
following is the response. VCO does not have any work flow runs so I assumed nothing was executed. I can run https://wxpcpvcd006a:8281/api/workflows/f29ebe52-27b2-42d1-84f1-6ecfb939326c to get all the info about the workflow. Any help appreciated.
{
"relations": {
"total": 0,
"link": [
{
"href": "https://wxpcpvcd006a:8281/vco/api/workflows/94dd5f20-c190-4023-a0a7-1589c46f3792/",
"rel": "up"
},
{
"href": "https://wxpcpvcd006a:8281/vco/api/workflows/94dd5f20-c190-4023-a0a7-1589c46f3792/executions/",
"rel": "add"
}
]
}
}
just enter opening/closing curly braces as your json content:
{}
My article steps you through the process of calling workflows with REST: http://bit.ly/restvco - you should certainly see a workflow execution when you have completed the call properly.
Hi Burke,
I followed your blog. It works fine with GET request like getting workflow executions, definition etc. It does not work for running workflows - POST request. I noticed POST to run workflow get 301 redirect for GET. I am running VCO 5.5.1 version.
Attached are screenshots.
In vCO 5.5.x and up, the URLs of REST API requests have been changed a bit
Instead of
they now look like
https://[host]:[port]/vco/api/...
That's one of the reasons you get 301 redirects.
I have tried /vco ,it throws 400 error with.
VCO was recently upgraded to 5.5.1.
<html>
<head>
<meta content="HTML Tidy for Java (vers. 26 Sep 2004), see www.w3.org" name="generator"/>
<title>VMware vFabric tc Runtime 2.9.5.SR1/7.0.50.C.RELEASE - Error report</title>
<style type="text/css"><!--H1 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:22px;} H2 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:16px;} H3 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:14px;} BODY {font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;} B {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;} P {font-family:Tahoma,Arial,sans-serif;background:white;color:black;font-size:12px;}A {color : black;}A.name {color : black;}HR {color : #525D76;}--></style>
</head>
<body>
<h1>HTTP Status 400 -</h1>
<hr noshade="noshade" size="1"/>
<p>
<b>type</b>
Status report
</p>
<p>
<b>message</b>
</p>
<p>
<b>description</b>
<u>The request sent by the client was syntactically incorrect.</u>
</p>
<hr noshade="noshade" size="1"/>
<h3>VMware vFabric tc Runtime 2.9.5.SR1/7.0.50.C.RELEASE</h3>
</body>
</html>
Which means your POST request body is not properly formatted. Could you show the exact XML or JSON body content?
Yes, POST is not supported on https://[host]:[port]:8281/vco/api/workflows/[workflow-id] (the URL I see on the screenshot)
To start the workflow, you need to POST to the following URL
https://[host]:[port]:8281/vco/api/workflows/[workflow-id]/executions
I get same error.
I might have to update REST plugin. I will update after that.
Even a simple workflow with Zero inputs still requires a body when doing a post...
just enter opening/closing curly braces as your json content:
{}
Thanks Burke and llian