常見 AEM cURL 命令清單

本文可協助您瞭解常見AEM cURL命令清單。

說明 description

環境

Adobe Experience Manager (AEM) 6.4和6.5

步驟

復寫動作:

啟動

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

停用
        curl -u admin:admin -XPOST-F path="/content/path/to/page" -F cmd="deactivate" http://localhost:4502/bin/replicate.json

樹啟動
        curl -u admin:admin -F cmd=activate -F ignoredeactivated=true -F onlymodified=true -F path=/content/geometrixx http://localhost:4502/etc/replication/treeactivation.html

頁面:

鎖定頁面
        curl -u admin:admin -XPOST-F cmd="lockPage" -F path="/content/path/to/page" -F "charset"="utf-8" http://localhost:4502/bin/wcmcommand

解鎖頁面
        curl -u admin:admin -XPOST-F cmd="unlockPage" -F path="/content/path/to/page" -F "charset"="utf-8" http://localhost:4502/bin/wcmcommand

複製頁面
        curl -u admin:admin -F cmd=copyPage -F destParentPath=/path/to/destination/parent -F srcPath=/path/to/source/location http://localhost:4502/bin/wcmcommand

復寫代理程式:

建立復寫代理

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'

套件組合:

解除安裝套件組合

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

安裝套件組合
        curl -u admin:admin -F action=install -F bundlestartlevel=20 -F bundlefile=@"jar.jar的名稱" http://localhost:4502/system/console/bundles

建立套件組合
        curl -u admin:admin -F bundleHome=/apps/project_name_here/bundles/bundle -F descriptor=/apps/project_name_here/bundles/project_name_here/name_of_bundle.bnd http://localhost:4502/libs/crxde/build

停止套件組合
        curl -u admin:admin http://localhost:4502/system/console/bundles/org.apache.sling.scripting.jsp -F action=stop

啟動套件組合
        curl -u admin:admin http://localhost:4502/system/console/bundles/org.apache.sling.scripting.jsp -F action=start

刪除套件組合
         curl -u admin:admin -XDELETEhttp://localhost:4502/apps/localhost/install/com.localhost.core-6.2.26-SNAPSHOT.jar

封裝:

上傳新封裝

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

安裝現有的套件
        curl -u admin:admin -XPOSThttp://localhost:4502/crx/packmgr/service/.json/etc/packages/export/name封裝?cmd=install

上傳套件並安裝
        curl -u admin:admin -F file=@"zip檔案的名稱" -F name="封裝名稱" -F force=true -F install=true http://localhost:4502/crx/packmgr/service.jsp

上傳套件不安裝
        curl -u admin:admin -F file=@"zip檔案的名稱" -F name="封裝名稱" -F force=true -F install=false http://localhost:4502/crx/packmgr/service.jsp

在CQ中重新建置現有套件
        curl -u admin:admin -XPOSThttp://localhost:4502/crx/packmgr/service/.json/etc/packages/name_of_package.zip?cmd=build

下載(套件)
        curl -u admin:admin http://localhost:4502/etc/packages/export/name_of_package.zip > 本機封裝檔案的名稱

使用者管理:

將使用者新增至群組

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

從群組移除使用者
        curl -u admin:admin -FremoveMembers=testing http://localhost:4502/home/groups/c/contributor.rw.html

備份

設定延遲時間(選用 — 預設為10)

curl -u admin:admin -XPOSThttp://localhost:4502/system/console/jmx/com.adobe.granite:type=Repository/a/BackupDelay?value=0

curl -u admin:admin -XPOSThttp://localhost:4502/system/console/jmx/com.adobe.granite%3Atype%3DRepository/op/startBackup/java.lang.String?target=mvtest

在DAM中上傳資產

上傳資產(例如:test.png)
curl -u admin:admin -XPOST-F file=@"test.png" http://localhost:4502/content/dam/geometrixx/portraits.createasset.html

重新索引

重新索引特定索引(例如:damStatus)
curl -u admin:admin -F"reindex=true" http://localhost:4502/oak:index/damStatus

解析度 resolution

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