一般的な 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/"name of bundle"

バンドルのインストール
        curl -u admin:admin -F action=install -F bundlestartlevel=20 -F bundlefile=@"name of jar.jar" http://localhost:4502/system/console/bundles

バンドルのビルド
        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

バンドルを停止
        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 of package?cmd=install

パッケージのアップロードとインストール
        curl -u admin:admin -F file=@"name of zip file" -F name="name of package" -F force=true -F install=true http://localhost:4502/crx/packmgr/service.jsp

パッケージをアップロードします。インストールしない
        curl -u admin:admin -F file=@"name of zip file" -F name="name of package" -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

REINDEX

特定のインデックスの再インデックス(例: damStatus)
curl -u admin:admin -F"reindex=true" http://localhost:4502/oak:index/damStatus

解決策 resolution

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