Skip to content

Instantly share code, notes, and snippets.

@cpilsworth
Created July 5, 2013 08:36

Revisions

  1. Sergei Müller revised this gist Jun 27, 2013. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -17,11 +17,11 @@ Build a bundle

    Stop a bundle
    curl -u admin:admin http://localhost:4505/system/console/bundles/org.apache.sling.scripting.jsp
    -Faction=stop
    -F action=stop

    Start a bundle
    curl -u admin:admin http://localhost:4505/system/console/bundles/org.apache.sling.scripting.jsp
    -Faction=start
    -F action=start

    Delete a node (hierarchy) - (this will delete any directory / node / site)
    curl -X DELETE http://localhost:4505/path/to/node/jcr:content/nodeName -u admin:admin
  2. Sergei Müller revised this gist Jun 26, 2013. 1 changed file with 0 additions and 2 deletions.
    2 changes: 0 additions & 2 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -57,11 +57,9 @@ Tree Activation
    -F path=/content/geometrixx http://localhost:4502/etc/replication/treeactivation.html

    Lock 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

    Unlock 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

    Further Resources:
  3. Sergei Müller revised this gist Jun 26, 2013. 1 changed file with 8 additions and 0 deletions.
    8 changes: 8 additions & 0 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -56,6 +56,14 @@ Tree Activation
    curl -u admin:admin -F cmd=activate -F ignoredeactivated=true -F onlymodified=true
    -F path=/content/geometrixx http://localhost:4502/etc/replication/treeactivation.html

    Lock 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

    Unlock 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

    Further Resources:

    http://cq-ops.tumblr.com/post/19017053665/useful-curl-commands
  4. Sergei Müller revised this gist Jun 25, 2013. 1 changed file with 4 additions and 1 deletion.
    5 changes: 4 additions & 1 deletion gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -56,4 +56,7 @@ Tree Activation
    curl -u admin:admin -F cmd=activate -F ignoredeactivated=true -F onlymodified=true
    -F path=/content/geometrixx http://localhost:4502/etc/replication/treeactivation.html

    Further Resources - http://cq-ops.tumblr.com/post/19017053665/useful-curl-commands
    Further Resources:

    http://cq-ops.tumblr.com/post/19017053665/useful-curl-commands
    http://balawcm.wordpress.com/2013/02/13/curl-it-out-adobe-cq5-curl-commands-and-usage/
  5. Sergei Müller revised this gist Jun 25, 2013. 1 changed file with 6 additions and 0 deletions.
    6 changes: 6 additions & 0 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -46,6 +46,12 @@ Upload a new package
    Install an existing package
    curl -u admin:admin -X POST http://localhost:4505/crx/packmgr/service/.json/etc/packages/export/name of package?cmd=install

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

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

    Tree Activation
    curl -u admin:admin -F cmd=activate -F ignoredeactivated=true -F onlymodified=true
    -F path=/content/geometrixx http://localhost:4502/etc/replication/treeactivation.html
  6. Sergei Müller revised this gist Jun 12, 2013. 1 changed file with 10 additions and 10 deletions.
    20 changes: 10 additions & 10 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -6,14 +6,6 @@ Note 3: Quotes around name of package (or name of zip file, or jar) should be in
    Uninstall a bundle (use http://localhost:4505/system/console/bundles to access the Apache Felix web console)
    curl -u admin:admin -daction=uninstall http://localhost:4505/system/console/bundles/"name of bundle"

    Upload a package AND install
    curl -u admin:admin -F file=@"name of zip file" -F name="name of package"
    -F force=true -F install=true http://localhost:4505/crx/packmgr/service.jsp

    Upload a package DO NOT install
    curl -u admin:admin -F file=@"name of zip file" -F name="name of package"
    -F force=true -F install=false http://localhost:4505/crx/packmgr/service.jsp

    Install a bundle
    curl -u admin:admin -F action=install -F bundlestartlevel=20 -F
    bundlefile=@"name of jar.jar" http://localhost:4505/system/console/bundles
    @@ -34,16 +26,24 @@ Start a bundle
    Delete a node (hierarchy) - (this will delete any directory / node / site)
    curl -X DELETE http://localhost:4505/path/to/node/jcr:content/nodeName -u admin:admin

    Upload a package AND install
    curl -u admin:admin -F file=@"name of zip file" -F name="name of package"
    -F force=true -F install=true http://localhost:4505/crx/packmgr/service.jsp

    Upload a package DO NOT install
    curl -u admin:admin -F file=@"name of zip file" -F name="name of package"
    -F force=true -F install=false http://localhost:4505/crx/packmgr/service.jsp

    Rebuild an existing package in CQ
    curl -u admin:admin -X POST http://localhost:4505:/crx/packmgr/service/.json/etc/packages/name_of_package.zip?cmd=build

    Download (the package)
    curl -u admin:admin http://localhost:4505/etc/packages/export/name_of_package.zip > name of local package file

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

    Install
    Install an existing package
    curl -u admin:admin -X POST http://localhost:4505/crx/packmgr/service/.json/etc/packages/export/name of package?cmd=install

    Tree Activation
  7. Sergei Müller revised this gist Dec 10, 2012. 1 changed file with 1 addition and 2 deletions.
    3 changes: 1 addition & 2 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -32,8 +32,7 @@ Start a bundle
    -Faction=start

    Delete a node (hierarchy) - (this will delete any directory / node / site)
    curl -F":operation=delete" -F":applyTo=name of node tree"
    http://localhost:90002/ -u admin:admin
    curl -X DELETE http://localhost:4505/path/to/node/jcr:content/nodeName -u admin:admin

    Rebuild an existing package in CQ
    curl -u admin:admin -X POST http://localhost:4505:/crx/packmgr/service/.json/etc/packages/name_of_package.zip?cmd=build
  8. Sergei Müller revised this gist Jun 12, 2012. 1 changed file with 23 additions and 23 deletions.
    46 changes: 23 additions & 23 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -1,54 +1,54 @@
    Note 1: The following CQ curl commands assumes a admin:admin username and password.
    Note 2: For Windows/Powershell users: use two "" when doing a -F cURL command.
    Example: -F"":operation=delete""
    Example: -F"":operation=delete""
    Note 3: Quotes around name of package (or name of zip file, or jar) should be included.

    Uninstall a bundle (use http://localhost:4505/system/console/bundles to access the Apache Felix web console)
    curl -u admin:admin -daction=uninstall http://localhost:4505/system/console/bundles/"name of bundle"
    curl -u admin:admin -daction=uninstall http://localhost:4505/system/console/bundles/"name of bundle"

    Upload a package AND install
    curl -u admin:admin -F file=@"name of zip file" -F name="name of package"
    -F force=true -F install=true http://localhost:4505/crx/packmgr/service.jsp
    curl -u admin:admin -F file=@"name of zip file" -F name="name of package"
    -F force=true -F install=true http://localhost:4505/crx/packmgr/service.jsp

    Upload a package DO NOT install
    curl -u admin:admin -F file=@"name of zip file" -F name="name of package"
    -F force=true -F install=false http://localhost:4505/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:4505/crx/packmgr/service.jsp

    Install a bundle
    curl -u admin:admin -F action=install -F bundlestartlevel=20 -F
    bundlefile=@"name of jar.jar" http://localhost:4505/system/console/bundles
    curl -u admin:admin -F action=install -F bundlestartlevel=20 -F
    bundlefile=@"name of jar.jar" http://localhost:4505/system/console/bundles

    Build a bundle
    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:4505/libs/crxde/build
    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:4505/libs/crxde/build

    Stop a bundle
    curl -u admin:admin http://localhost:4505/system/console/bundles/org.apache.sling.scripting.jsp
    -Faction=stop
    curl -u admin:admin http://localhost:4505/system/console/bundles/org.apache.sling.scripting.jsp
    -Faction=stop

    Start a bundle
    curl -u admin:admin http://localhost:4505/system/console/bundles/org.apache.sling.scripting.jsp
    -Faction=start
    curl -u admin:admin http://localhost:4505/system/console/bundles/org.apache.sling.scripting.jsp
    -Faction=start

    Delete a node (hierarchy) - (this will delete any directory / node / site)
    curl -F":operation=delete" -F":applyTo=name of node tree"
    http://localhost:90002/ -u admin:admin
    curl -F":operation=delete" -F":applyTo=name of node tree"
    http://localhost:90002/ -u admin:admin

    Rebuild an existing package in CQ
    curl -u admin:admin -X POST http://localhost:4505:/crx/packmgr/service/.json/etc/packages/name_of_package.zip?cmd=build
    curl -u admin:admin -X POST http://localhost:4505:/crx/packmgr/service/.json/etc/packages/name_of_package.zip?cmd=build

    Download (the package)
    curl -u admin:admin http://localhost:4505/etc/packages/export/name_of_package.zip > name of local package file
    curl -u admin:admin http://localhost:4505/etc/packages/export/name_of_package.zip > name of local package file

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

    Install
    curl -u admin:admin -X POST http://localhost:4505/crx/packmgr/service/.json/etc/packages/export/name of package?cmd=install
    curl -u admin:admin -X POST http://localhost:4505/crx/packmgr/service/.json/etc/packages/export/name of package?cmd=install

    Tree Activation
    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 -F cmd=activate -F ignoredeactivated=true -F onlymodified=true
    -F path=/content/geometrixx http://localhost:4502/etc/replication/treeactivation.html

    Further Resources - http://cq-ops.tumblr.com/post/19017053665/useful-curl-commands
  9. Sergei Müller revised this gist Jun 12, 2012. 1 changed file with 22 additions and 13 deletions.
    35 changes: 22 additions & 13 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -7,39 +7,48 @@ Uninstall a bundle (use http://localhost:4505/system/console/bundles to access t
    curl -u admin:admin -daction=uninstall http://localhost:4505/system/console/bundles/"name of bundle"

    Upload a package AND install
    curl -u admin:admin -F file=@"name of zip file" -F name="name of package" -F force=true -F install=true http://localhost:4505/crx/packmgr/service.jsp
    curl -u admin:admin -F file=@"name of zip file" -F name="name of package"
    -F force=true -F install=true http://localhost:4505/crx/packmgr/service.jsp

    Upload a package DO NOT install
    curl -u admin:admin -F file=@"name of zip file" -F name="name of package" -F force=true -F install=false http://localhost:4505/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:4505/crx/packmgr/service.jsp

    Install a bundle
    curl -u admin:admin -F action=install -F bundlestartlevel=20 -F bundlefile=@"name of jar.jar" http://localhost:4505/system/console/bundles
    curl -u admin:admin -F action=install -F bundlestartlevel=20 -F
    bundlefile=@"name of jar.jar" http://localhost:4505/system/console/bundles

    Build a bundle
    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:4505/libs/crxde/build
    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:4505/libs/crxde/build

    Stop a bundle
    curl -u admin:admin http://localhost:4505/system/console/bundles/org.apache.sling.scripting.jsp -Faction=stop
    curl -u admin:admin http://localhost:4505/system/console/bundles/org.apache.sling.scripting.jsp
    -Faction=stop

    Start a bundle
    curl -u admin:admin http://localhost:4505/system/console/bundles/org.apache.sling.scripting.jsp -Faction=start
    curl -u admin:admin http://localhost:4505/system/console/bundles/org.apache.sling.scripting.jsp
    -Faction=start

    Delete a node (hierarchy) - (this will delete any directory / node / site)
    curl -F":operation=delete" -F":applyTo=name of node tree" http://localhost:90002/ -u admin:admin
    curl -F":operation=delete" -F":applyTo=name of node tree"
    http://localhost:90002/ -u admin:admin

    Rebuild an existing package in CQ - (this will ensure that latest content is taken from the CQ instance)
    curl -u admin:admin -X POST http://:/crx/packmgr/service/.json/etc/packages/name of package.zip?cmd=build
    Rebuild an existing package in CQ
    curl -u admin:admin -X POST http://localhost:4505:/crx/packmgr/service/.json/etc/packages/name_of_package.zip?cmd=build

    Download (the package)
    curl -u admin:admin http://localhost:4505/etc/packages/export/name of package.zip > name of local package file
    curl -u admin:admin http://localhost:4505/etc/packages/export/name_of_package.zip > name of local package file

    Upload
    curl -u admin:admin -F package=@"name of package.zip" http://hostname:port/crx/packmgr/service/.json/?cmd=upload
    curl -u admin:admin -F package=@"name_of_package.zip" http://localhost:4505/crx/packmgr/service/.json/?cmd=upload

    Install
    curl -u admin:admin -X POST http://hostname:port/crx/packmgr/service/.json/etc/packages/export/name of package?cmd=install
    curl -u admin:admin -X POST http://localhost:4505/crx/packmgr/service/.json/etc/packages/export/name of package?cmd=install

    Tree Activation
    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 -F cmd=activate -F ignoredeactivated=true -F onlymodified=true
    -F path=/content/geometrixx http://localhost:4502/etc/replication/treeactivation.html

    Further Resources - http://cq-ops.tumblr.com/post/19017053665/useful-curl-commands
  10. Sergei Müller revised this gist Jun 12, 2012. 1 changed file with 14 additions and 14 deletions.
    28 changes: 14 additions & 14 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -1,45 +1,45 @@
    Note 1: The following CQ curl commands assumes a admin:admin username and password.
    Note 2: For Windows/Powershell users: use two "" when doing a -F cURL command.
    Example: -F"":operation=delete""
    Example: -F"":operation=delete""
    Note 3: Quotes around name of package (or name of zip file, or jar) should be included.

    Uninstall a bundle (use http://localhost:4505/system/console/bundles to access the Apache Felix web console)
    curl -u admin:admin -daction=uninstall http://localhost:4505/system/console/bundles/"name of bundle"
    curl -u admin:admin -daction=uninstall http://localhost:4505/system/console/bundles/"name of bundle"

    Upload a package AND install
    curl -u admin:admin -F file=@"name of zip file" -F name="name of package" -F force=true -F install=true http://localhost:4505/crx/packmgr/service.jsp
    curl -u admin:admin -F file=@"name of zip file" -F name="name of package" -F force=true -F install=true http://localhost:4505/crx/packmgr/service.jsp

    Upload a package DO NOT install
    curl -u admin:admin -F file=@"name of zip file" -F name="name of package" -F force=true -F install=false http://localhost:4505/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:4505/crx/packmgr/service.jsp

    Install a bundle
    curl -u admin:admin -F action=install -F bundlestartlevel=20 -F bundlefile=@"name of jar.jar" http://localhost:4505/system/console/bundles
    curl -u admin:admin -F action=install -F bundlestartlevel=20 -F bundlefile=@"name of jar.jar" http://localhost:4505/system/console/bundles

    Build a bundle
    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:4505/libs/crxde/build
    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:4505/libs/crxde/build

    Stop a bundle
    curl -u admin:admin http://localhost:4505/system/console/bundles/org.apache.sling.scripting.jsp -Faction=stop
    curl -u admin:admin http://localhost:4505/system/console/bundles/org.apache.sling.scripting.jsp -Faction=stop

    Start a bundle
    curl -u admin:admin http://localhost:4505/system/console/bundles/org.apache.sling.scripting.jsp -Faction=start
    curl -u admin:admin http://localhost:4505/system/console/bundles/org.apache.sling.scripting.jsp -Faction=start

    Delete a node (hierarchy) - (this will delete any directory / node / site)
    curl -F":operation=delete" -F":applyTo=name of node tree" http://localhost:90002/ -u admin:admin
    curl -F":operation=delete" -F":applyTo=name of node tree" http://localhost:90002/ -u admin:admin

    Rebuild an existing package in CQ - (this will ensure that latest content is taken from the CQ instance)
    curl -u admin:admin -X POST http://:/crx/packmgr/service/.json/etc/packages/name of package.zip?cmd=build
    curl -u admin:admin -X POST http://:/crx/packmgr/service/.json/etc/packages/name of package.zip?cmd=build

    Download (the package)
    curl -u admin:admin http://localhost:4505/etc/packages/export/name of package.zip > name of local package file
    curl -u admin:admin http://localhost:4505/etc/packages/export/name of package.zip > name of local package file

    Upload
    curl -u admin:admin -F package=@"name of package.zip" http://hostname:port/crx/packmgr/service/.json/?cmd=upload
    curl -u admin:admin -F package=@"name of package.zip" http://hostname:port/crx/packmgr/service/.json/?cmd=upload

    Install
    curl -u admin:admin -X POST http://hostname:port/crx/packmgr/service/.json/etc/packages/export/name of package?cmd=install
    curl -u admin:admin -X POST http://hostname:port/crx/packmgr/service/.json/etc/packages/export/name of package?cmd=install

    Tree Activation
    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 -F cmd=activate -F ignoredeactivated=true -F onlymodified=true -F path=/content/geometrixx http://localhost:4502/etc/replication/treeactivation.html

    Further Resources - http://cq-ops.tumblr.com/post/19017053665/useful-curl-commands
  11. Sergei Müller created this gist Jun 12, 2012.
    45 changes: 45 additions & 0 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,45 @@
    Note 1: The following CQ curl commands assumes a admin:admin username and password.
    Note 2: For Windows/Powershell users: use two "" when doing a -F cURL command.
    Example: -F"":operation=delete""
    Note 3: Quotes around name of package (or name of zip file, or jar) should be included.

    Uninstall a bundle (use http://localhost:4505/system/console/bundles to access the Apache Felix web console)
    curl -u admin:admin -daction=uninstall http://localhost:4505/system/console/bundles/"name of bundle"

    Upload a package AND install
    curl -u admin:admin -F file=@"name of zip file" -F name="name of package" -F force=true -F install=true http://localhost:4505/crx/packmgr/service.jsp

    Upload a package DO NOT install
    curl -u admin:admin -F file=@"name of zip file" -F name="name of package" -F force=true -F install=false http://localhost:4505/crx/packmgr/service.jsp

    Install a bundle
    curl -u admin:admin -F action=install -F bundlestartlevel=20 -F bundlefile=@"name of jar.jar" http://localhost:4505/system/console/bundles

    Build a bundle
    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:4505/libs/crxde/build

    Stop a bundle
    curl -u admin:admin http://localhost:4505/system/console/bundles/org.apache.sling.scripting.jsp -Faction=stop

    Start a bundle
    curl -u admin:admin http://localhost:4505/system/console/bundles/org.apache.sling.scripting.jsp -Faction=start

    Delete a node (hierarchy) - (this will delete any directory / node / site)
    curl -F":operation=delete" -F":applyTo=name of node tree" http://localhost:90002/ -u admin:admin

    Rebuild an existing package in CQ - (this will ensure that latest content is taken from the CQ instance)
    curl -u admin:admin -X POST http://:/crx/packmgr/service/.json/etc/packages/name of package.zip?cmd=build

    Download (the package)
    curl -u admin:admin http://localhost:4505/etc/packages/export/name of package.zip > name of local package file

    Upload
    curl -u admin:admin -F package=@"name of package.zip" http://hostname:port/crx/packmgr/service/.json/?cmd=upload

    Install
    curl -u admin:admin -X POST http://hostname:port/crx/packmgr/service/.json/etc/packages/export/name of package?cmd=install

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

    Further Resources - http://cq-ops.tumblr.com/post/19017053665/useful-curl-commands