Hello,
This may be trivial but I can't seem to find an answer to this. I am using a lamp stack with a php cURL call to vRealize Orchestrator to start a workflow. I would like to get a response back from that workflow but when I try to print the body of the response there isn't anything there. How do you format your workflow so that it returns an acceptable body for a REST response? Can you please be descriptive with your response?
thanks,
Could you provide the exact steps/commands you are executing?
Here are the request & response from my environment
curl -ik -u user:pass -X POST https://10.20.1.1:8281/vco/api/workflows/95879b46-bbd5-4929-970c-c711eea0e140/executions -H "Content-Type: application/xml" -d @request.xml
HTTP/1.1 202 Accepted
Server: Apache-Coyote/1.1
Location: https://10.20.1.1:8281/vco/api/workflows/95879b46-bbd5-4929-970c-c711eea0e140/executions/4028e38155a...5a1c420cf0009/
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
Strict-Transport-Security: max-age=31536000 ; includeSubDomains
X-XSS-Protection: 1; mode=block
X-Frame-Options: DENY
X-Content-Type-Options: nosniff
Content-Length: 0
Date: Thu, 30 Jun 2016 14:43:53 GMT
Hi,
You start a workflow by sending POST request to https://{vrohost}:8281/vco/api/workflows/{workflowid}/executions/. It doesn't return a response body; instead, it returns status code 202 Accepted, and there should be Location HTTP header containing the URL of the workflow execution that has been started. So you need to fetch the URL value from Location header and use other REST requests to interact with it; eg . there is GET https://{vrohost}:8281/vco/api/workflows/{workflowid}/executions/{executionid} to retrieve information about the execution.
I did not get a status or a location. Here is what I got back:
POST /vco/api/workflows/{ID}/executions HTTP/1.1 Authorization: Basic{Jumble of letters}= Host:{vRO Instance}:8281 Accept: */* Content-Type: application/json Content-Length: 247
I don't see a workflow ID that I can query with?
thanks,
Could you provide the exact steps/commands you are executing?
Here are the request & response from my environment
curl -ik -u user:pass -X POST https://10.20.1.1:8281/vco/api/workflows/95879b46-bbd5-4929-970c-c711eea0e140/executions -H "Content-Type: application/xml" -d @request.xml
HTTP/1.1 202 Accepted
Server: Apache-Coyote/1.1
Location: https://10.20.1.1:8281/vco/api/workflows/95879b46-bbd5-4929-970c-c711eea0e140/executions/4028e38155a...5a1c420cf0009/
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
Strict-Transport-Security: max-age=31536000 ; includeSubDomains
X-XSS-Protection: 1; mode=block
X-Frame-Options: DENY
X-Content-Type-Options: nosniff
Content-Length: 0
Date: Thu, 30 Jun 2016 14:43:53 GMT