Elenco di comandi cURL comuni per AEM

Questo articolo illustra l’elenco dei comandi cURL comuni per AEM.

Descrizione description

Ambiente

Adobe Experience Manager (AEM) 6.4 e 6.5

Passaggi

AZIONI DI REPLICA:

Attiva

curl -u admin:admin -X POST -F path="/content/path/to/page" -F cmd="activate" http://localhost:4502/bin/replicate.json

Disattiva
        curl -u admin:admin -X POST -F path="/content/path/to/page" -F cmd="deactivate" http://localhost:4502/bin/replicate.json

Attivazione struttura
        curl -u admin:admin -F cmd=activate -F ignoredeactivate=true -F onlymodified=true -F path=/content/geometrixx http://localhost:4502/etc/replication/treeactivation.html

PAGINE:

Blocca pagina
        curl -u admin:admin -X POST -F cmd="lockPage" -F path="/content/path/to/page" -F "charset"="utf-8" http://localhost:4502/bin/wcmcommand

Sblocca pagina
        curl -u admin:admin -X POST -F cmd="unlockPage" -F path="/content/path/to/page" -F "charset"="utf-8" http://localhost:4502/bin/wcmcommand

Copia pagina
        curl -u admin:admin -F cmd=copyPage -F destParentPath=/path/to/destination/parent -F srcPath=/path/to/source/location http://localhost:4502/bin/wcmcommand

AGENTE DI REPLICA:

Creare agenti di replica

curl -u admin:admin 'http://localhost:4502/bin/wcmcommand' -H 'Tipo di contenuto: application/x-www-form-urlencoded; charset=UTF-8' —dati 'cmd=createPage&charset=utf-8&parentPath=/etc/replication/agents.author&title=ReplicationAgentTest&label=&template=/libs/cq/replication/templates/agent'

BUNDLE:

Disinstallare un bundle

curl -u admin:admin -daction=uninstall http://localhost:4502/system/console/bundles/"nome del bundle"

Installare un bundle
        curl -u admin:admin -F action=install -F bundlestartlevel=20 -F bundlefile=@"nome di jar.jar" http://localhost:4502/system/console/bundles

Creare un bundle
        curl -u admin:admin -F bundleHome=/apps/project_name_here/bundles/name of bundle -F descriptor=/apps/project_name_here/bundles/project_name_here/name_of_bundle.bnd http://localhost:4502/libs/crxde/build

Interrompere un bundle
        curl -u admin:admin http://localhost:4502/system/console/bundles/org.apache.sling.scripting.jsp  -F action=stop

Avviare un bundle
        curl -u admin:admin http://localhost:4502/system/console/bundles/org.apache.sling.scripting.jsp  -F action=start

Eliminare un bundle
         curl -u admin:admin -X DELETE http://localhost:4502/apps/localhost/install/com.localhost.core-6.2.26-SNAPSHOT.jar

PACCHETTI:

Carica un nuovo pacchetto

curl -u admin:admin -F package=@"name_of_package.zip" http://localhost:4502/crx/packmgr/service/.json/?cmd=upload

Installare un pacchetto esistente
        curl -u admin:admin -X POST http://localhost:4502/crx/packmgr/service/.json/etc/packages/export/name del pacchetto?cmd=install

Caricare un pacchetto E installarlo
        curl -u admin:admin -F file=@"nome del file zip" -F name="nome del pacchetto" -F force=true -F install=true http://localhost:4502/crx/packmgr/service.jsp

Caricare un pacchetto e NON installarlo
        curl -u admin:admin -F file=@"nome del file zip" -F name="nome del pacchetto" -F force=true -F install=false http://localhost:4502/crx/packmgr/service.jsp

Rigenerare un pacchetto esistente in CQ
        curl -u admin:admin -X POST http://localhost:4502/crx/packmgr/service/.json/etc/packages/name_of_package.zip?cmd=build

Scarica (il pacchetto)
        curl -u admin:admin http://localhost:4502/etc/packages/export/name_of_package.zip > nome del file del pacchetto locale

AMMINISTRAZIONE UTENTE:

Aggiungere un utente a un gruppo

curl -u admin:admin -FaddMembers=testing http://localhost:4502/home/groups/c/contributor.rw.html

Rimuovere un utente da un gruppo
        curl -u admin:admin -FremoveMembers=testing http://localhost:4502/home/groups/c/contributor.rw.html

BACKUP

Imposta ritardo (facoltativo, il valore predefinito è 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

CARICARE RISORSE IN DAM

Caricare una risorsa (ad esempio, test.png)
curl -u admin:admin -X POST -F file=@"test.png" http://localhost:4502/content/dam/geometrixx/portraits.createasset.html

REINDICIZZARE

Reindicizzare un indice specifico (ad esempio, damStatus)
curl -u admin:admin -F"reindex=true" http://localhost:4502/oak:index/damStatus

Risoluzione resolution

recommendation-more-help
3d58f420-19b5-47a0-a122-5c9dab55ec7f