Hi All,
As examples given in the URL, https://docs.adobe.com/docs/en/aem/6-0/develop/extending/workflows/wf-extending/wf-rest-api.html
When I tried using the REST URL in our environment, got could not connect to host error.
For e.g. Get the list of running workflow
http://localhost:4502/etc/workflow/instances.RUNNING (in browser : gives forbidden access)
Using Curl command: curl -u admin:admin http://localhost:4502/etc/workflow/instances.RUNNING.json (gives error as : could not connect to host)
Same for starting a workflow.
My requirement is to start a workflow using the Curl command, but getting could not connect to host error on localhost author instance. Please advice.
Thanks,
Anand
Solved! Go to Solution.
Hi,
when you get the message "could not connect to host", it's a network problem, as your curl is not able to connect to the remote system. So it's not a problem of AEM. Maybe your browser is configure to use proxy, in that case you need to provide this proxy to curl, too.
kind regards,
Jörg
Instead of trying to get these CURL commands working -- ie:
http://localhost:4502/etc/workflow/instances.RUNNING
You have much tighter control by writing a custom Sling Servlet in AEM that invokes the workflow using Workflow API:
https://helpx.adobe.com/experience-manager/using/invoking-experience-manager-workflows-using.html
Then use CURL or another RESTful tool to invoke the AEM Servlet.
Views
Replies
Total Likes
Thanks. That's a good alternative. I can try that. Any reason why Curl command not working directly on workflow instance.
Views
Replies
Total Likes
smacdonald2008 wrote...
Instead of trying to get these CURL commands working -- ie:
http://localhost:4502/etc/workflow/instances.RUNNING
You have much tighter control by writing a custom Sling Servlet in AEM that invokes the workflow using Workflow API:
https://helpx.adobe.com/experience-manager/using/invoking-experience-manager-workflows-using.html
Then use CURL or another RESTful tool to invoke the AEM Servlet.
Then use CURL or another RESTful tool to invoke the AEM Servlet.
Need clarification : Steps; 1- Created workflow process ,
2- creating custom servlet class which will invoke workflow using workflow API
3- Deploy this servlet as bundle in AEM
Question : How this custom servlet class will be exposed as REST URL ? ( This can be access withing AEM like in any component JSP page, but how do we access this class externally ?)
I want to call this custom servlet URL from external java class as REST URL or curl command.
Thanks,
Anand
Views
Replies
Total Likes
Hi,
when you get the message "could not connect to host", it's a network problem, as your curl is not able to connect to the remote system. So it's not a problem of AEM. Maybe your browser is configure to use proxy, in that case you need to provide this proxy to curl, too.
kind regards,
Jörg
"I want to call this custom servlet URL from external java class."
We have a community article that shows invoking a custom AEM Sling Servlet from a Java Swing app (in this app - we post files from the desktop to an AEM Servlet). However - you will see how to do it:
https://helpx.adobe.com/experience-manager/using/post_files.html
Views
Replies
Total Likes
I find CURL to be hit and miss. You have better control over using APIs/Restful requests.
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies