Issue
I have been using package manager commands to deploy AEM packages to author nodes as part of a Continuous Deployment pipeline. I am now extending this to deploy directly to publish nodes. I need (according to the node owners) to do this slightly differently.
Since I am programming these interactions and have to support a whole bunch of nodes, I was wondering if the pipeline can call some endpoint which is somehow unique to an author or a publish so I can detect which was selected this time around?
For context here's an example of the calls I am making.
curl -u admin:admin -X POST http://localhost:4502/crx/packmgr/service/.json/etc/packages/my_packages/samplepackage.zip?cmd=uninstall
I regret I am not (yet) that familiar with AEM beyond the package manager API. I got this example from AEM CQ5 Tutorials but have found nothing else there directly useful, perhaps because I am unsure whcih REST APIs relate to which kinds of node.
If I could find a cheap and harmless GET that is unique to one or the other I would be sorted.
Solution
I have used this SlingSettings
API to get sling runmodes using which you can determine whether it is author
or publish
. It's a pretty lightweight call.
http(s):<host:port>/system/console/status-slingsettings.json
Answered By - Abhishek Answer Checked By - Senaida (PHPFixing Volunteer)
0 Comments:
Post a Comment
Note: Only a member of this blog may post a comment.