AEM - Adobe Experience Manager (6.3)

less than 1 minute read

Collection of curl commands.

User Management

Change (Admin-)Password:

you’ll need jq for this…

#!/bin/sh

# get USER_PATH from specific user - this different on every System
USER_PATH=$(/usr/bin/curl --connect-timeout 10 -s -u admin:<OLD-PW> -X GET "http://<AUTHOR>:<PORT>/bin/querybuilder.json?path=/home/users&1_property=rep:authorizableId&1_property.value=admin&p.limit=-1" | jq . | cat | grep path | cut -d'"' -f4)


# change PW
/usr/bin/curl --connect-timeout 10 -s -u admin:<OLD-PW> -Fplain=<NEW-PW> -Fverify=<NEW-PW>  -Fold=<OLD-PW> -FPath="${USER_PATH}" http://<AUTHOR>:<PORT>/crx/explorer/ui/setpassword.jsp

###

Agents

Replication Agents:

configures the Replication Agent on the <AUTHOR> to publish the content to the <PUBLISHER>

/usr/bin/curl --connect-timeout 10 -u admin:<ADMIN-PW> -FtransportUri="http://<PUBLISHER>:<PORT>/bin/receive?sling:authRequestLogin=1" "http://<AUTHOR>:<PORT>/etc/replication/agents.author/publish/jcr:content"

Backup

Package Management

Download Package

curl -u admin:<PASSWORD> https://<SERVER>:<PORT>/etc/packages/<PKG-GROUP>/<PACKAGENAME>.zip > <LOCAL-PATH>/<PACKAGENAME>.zip

Upload Package (w/o install)

curl -u admin:<PASSWORD> -F file=@"<PKG-GROUP>/<PACKAGENAME>.zip" -F name="<PACKAGENAME>" -F force=true -F install=false http://<SERVER>:<PORT>/crx/packmgr/service.jsp

(Re)Build existing package

curl -u admin:<PASSWORD> -X POST http://<SERVER>:<PORT>/crx/packmgr/service/.json/etc/packages/<PKG-GROUP>/<PACKAGENAME>.zip?cmd=build