AEM provides a gazillion out of the box services ready for your command; it's hard to organize them and be aware of all their possibilities. The scattered web of knowledge doesn't help when you have to perform repetitive tasks without remembering all the technical details each time.
Based on CQ Unix Toolkit (https://github.com/Cognifide/CQ-Unix-Toolkit) there is an alternative approach for CQ REST knowledge stack:
The idea is very straightforward and simple:
1. Explore CQ REST services knowledge on daily basis
2. Wrap it in simple and handy tool by hiding unnecessary technical details
3. Share them on GitHub and make them useful for everyone
4. Use it and boost your personal and team productivity as well as performance
Be creative! Write tools, don't read twice!
13. Managing a cloud of...
...thousands of AEM/CQ instances
...hundreds of dev, test, qa, uat, live environments
14. Managing a cloud of...
...thousands of AEM/CQ instances
...hundreds of dev, test, qa, uat, live environments
...tens of client deployments
15. Managing a cloud of...
...thousands of AEM/CQ instances
...hundreds of dev, test, qa, uat, live environments
...tens of client deployments
in a consistent way!
21. Last but not least!
1 Automating repetetive tasks
22. Last but not least!
1 Automating repetetive tasks
2 Improving safety and security by not touching anything twice
23. Last but not least!
1 Automating repetetive tasks
2 Improving safety and security by not touching anything twice
3 Focusing on real challenges!!! Discovering new possibilities!
24. Last but not least!
1 Automating repetetive tasks
2 Improving safety and security by not touching anything twice
3 Focusing on real challenges!!! Discovering new possibilities!
4 Being happy, not bored!
25. Last but not least!
1 Automating repetetive tasks
2 Improving safety and security by not touching anything twice
3 Focusing on real challenges!!! Discovering new possibilities!
4 Being happy, not bored!
5 Loving what you do!
26. Use AEM/CQ REST infinitive possibilities!
UNIXUNIX
Try the github.com/Cognifide/CQ-Unix-Toolkit!
Start using it!
Help us develop it!
28. What is the CQ Unix Toolkit?
+ + = UNIXUNIX
open source user-friendly curl wrapper
29. What is the CQ Unix Toolkit?
+ + = UNIXUNIX
open source user-friendly curl wrapper
set of independent simple micro tools
30. What is the CQ Unix Toolkit?
+ + = UNIXUNIX
open source user-friendly curl wrapper
set of independent simple micro tools
AEM/CQ HTTP REST semi-code/semi-documentation
31. What is the CQ Unix Toolkit?
+ + = UNIXUNIX
open source user-friendly curl wrapper
set of independent simple micro tools
AEM/CQ HTTP REST semi-code/semi-documentation
allows to control CQ/dispatcher by HTTP
32. What is the CQ Unix Toolkit?
+ + = UNIXUNIX
open source user-friendly curl wrapper
set of independent simple micro tools
AEM/CQ HTTP REST semi-code/semi-documentation
allows to control CQ/dispatcher by HTTP
Commons are extracted into one cqapi tool.
63. Rule 2 — Write user-friendly usage messages
$ cqbld
Usage: cqbld [OPTION...] package-name
Build (rebuild) already uploaded package by group id and name in CQ Package
Manager using instance URL.
Examples:
cqbld -u admin pack # Build package named pack
cqbld -u admin -g GRP pack # Build package named pack in group GRP
cqbld -i http://localhost:5510 # Build package for localhost instance on tcp
-g com.group stuff # port 5510 named stuff in group:com.group
-p secret # with password provided: secret
Options:
-u use specified usernamed for connection
-p use provided password for authentication
-i use specified instance URL to connect
-g locate package by additional group ID
64. Rule 3 — Choose descriptive code over comments
# Invoke curl tool with current referer and
# instance URL and credentials to get list
# of packages
STATUS=`$CURLBIN -s --write-out "%{http_code}"
-u "$u:$p" -H "Referer: $url/crx/packmgr"
-F cmd=ls "$url/crx/packmgr/service.jsp"`
65. Rule 3 — Choose descriptive code over comments
# Invoke curl tool with current referer and
# instance URL and credentials to get list
# of packages
STATUS=`$CURLBIN -s --write-out "%{http_code}"
-u "$u:$p" -H "Referer: $url/crx/packmgr"
-F cmd=ls "$url/crx/packmgr/service.jsp"`
66. Rule 3 — Choose descriptive code over comments
PACKAGE_MANAGER_PATH="/crx/packmgr"
REFERER="${instance}${PACKAGE_MANAGER_PATH}"
AUTH="${username}:${password}"
FILEPATH="${PACKAGE_MANAGER_PATH}/service.jsp"
FULL_URL="${instance}${FILEPATH}"
REFERER_HEADER= "Referer: ${REFERER}"
COMMAND="cmd=ls"
Use shellcheck.net to validate POSIX shell syntax!