Étapes
ACTIONS DE RÉPLICATION :
Activer
curl -u admin:admin -X POST -F path="/content/path/to/page" -F cmd="activate" http://localhost:4502/bin/replicate.json
Désactiver
curl -u admin:admin -X POST -F path="/content/path/to/page" -F cmd="deactivate" http://localhost:4502/bin/replicate.json
Activation d’une arborescence
curl -u admin:admin -F cmd=activate -F ignoredeactivated=true -F onlymodified=true -F path=/content/geometrixx http://localhost:4502/etc/replication/treeactivation.html
PAGES :
Verrouiller la page
curl -u admin:admin -X POST -F cmd="lockPage" -F path="/content/path/to/page" -F "charset"="utf-8" http://localhost:4502/bin/wcmcommand
Déverrouiller la page
curl -u admin:admin -X POST -F cmd="unlockPage" -F path="/content/path/to/page" -F "charset"="utf-8" http://localhost:4502/bin/wcmcommand
Copier la page
curl -u admin:admin -F cmd=copyPage -F destParentPath=/path/to/destination/parent -F srcPath=/path/to/source/location http://localhost:4502/bin/wcmcommand
AGENT DE RÉPLICATION :
Création d’agents de réplication
curl -u admin:admin 'http://localhost:4502/bin/wcmcommand' -H 'Content-Type: application/x-www-form-urlencoded; charset=UTF-8' —data 'cmd=createPage&charset=utf-8&parentPath=/etc/replication/agents.author&title=ReplicationAgentTest&label=&template=/libs/cq/replication/templates/agent'
LOTS :
Désinstallation d’un lot
curl -u admin:admin -daction=uninstall http://localhost:4502/system/console/bundles/"nom du lot"
Installation d’un lot
curl -u admin:admin -F action=install -F bundlestartlevel=20 -F bundlefile=@"nom de jar.jar" http://localhost:4502/system/console/bundles
Création d’un lot
curl -u admin:admin -F bundleHome=/apps/centrica/bundles/name of bundle -F descriptor=/apps/centrica/bundles/com.centrica.cq.wcm.core-bundle/name_of_bundle.bnd http://localhost:4502/libs/crxde/build
Arrêt d’un lot
curl -u admin:admin http://localhost:4502/system/console/bundles/org.apache.sling.scripting.jsp -F action=stop
Démarrage d’un lot
curl -u admin:admin http://localhost:4502/system/console/bundles/org.apache.sling.scripting.jsp -F action=start
Suppression d’un lot
curl -u admin:admin -X DELETE http://localhost:4502/apps/localhost/install/com.localhost.core-6.2.26-SNAPSHOT.jar
PACKAGES :
Chargement d’un nouveau module
curl -u admin:admin -F package=@"nom_du_package.zip" http://localhost:4502/crx/packmgr/service/.json/?cmd=upload
Installer un package existant
curl -u admin:admin -X POST http://localhost:4502/crx/packmgr/service/.json/etc/packages/export/name du package?cmd=install
Télécharger un package ET l’installer
curl -u admin:admin -F file=@"nom du fichier zip" -F name="nom du package" -F force=true -F install=true http://localhost:4502/crx/packmgr/service.jsp
Télécharger un package NE PAS installer
curl -u admin:admin -F file=@"nom du fichier zip" -F name="nom du package" -F force=true -F install=false http://localhost:4502/crx/packmgr/service.jsp
Recréer un package existant dans CQ
curl -u admin:admin -X POST http://localhost:4502/crx/packmgr/service/.json/etc/packages/name_of_package.zip?cmd=build
Télécharger (le package)
curl -u admin:admin http://localhost:4502/etc/packages/export/name_of_package.zip nom du fichier de package local
ADMINISTRATION DES UTILISATEURS :
Ajout d’un utilisateur à un groupe
curl -u admin:admin -FaddMembers=testing http://localhost:4502/home/groups/c/contributor.rw.html
Supprimer un utilisateur d’un groupe
curl -u admin:admin -FremoveMembers=testing http://localhost:4502/home/groups/c/contributor.rw.html
SAUVEGARDE
Définir le délai (facultatif - la valeur par défaut est 10)
curl -u admin:admin -X POST http://localhost:4502/system/console/jmx/com.adobe.granite:type=Repository/a/BackupDelay?value=0
curl -u admin:admin -X POST http://localhost:4502/system/console/jmx/com.adobe.granite%3Atype%3DRepository/op/startBackup/java.lang.String?target=mvtest
CHARGEMENT DE RESSOURCES DANS DAM
Transfert d’une ressource (par exemple : test.png)
curl -u admin:admin -X POST -F file=@"test.png" http://localhost:4502/content/dam/geometrixx/portraits.createasset.html
REINDEX
Réindexation d’un index spécifique (par exemple : damStatus)
curl -u admin:admin -F"reindex=true" http://localhost:4502/oak:index/damStatus
…