Skip to content

Latest commit

 

History

History
55 lines (35 loc) · 2.05 KB

curl_cheatsheet.md

File metadata and controls

55 lines (35 loc) · 2.05 KB

Sling Curl Command

References

NOTES

USE --form-string instead of -F

Common Curl's

Clear Audit

curl -u admin:admin -F":operation=delete" http://localhost:4502/var/audit/com.day.cq.replication

curl -u admin:admin -F":operation=delete" http://localhost:4502/var/audit/com.day.cq.wcm.core.page

GC

curl -u admin:admin -X POST --data "delete=true&delay=2" http://localhost:4502/system/console/jmx/com.adobe.granite%3Atype%3DRepository/op/runDataStoreGarbageCollection/java.lang.Boolean

Upload DAM Image via WebDav

curl -u admin:admin -X PUT -T /Users/maxbarrass/Desktop/GearBumper.jpg http://localhost:4502/crx/repository/crx.default/content/dam/sitesmart/GearBumper1.jpg

curl -u admin:admin -X POST -T /Users/maxbarrass/Desktop/GearBumper.jpg http://localhost:4502/crx/repository/crx.default/content/dam/sitesmart/GearBumper2.jpg

Update DAM ASSET

curl -u admin:admin -Fdc:title="some title" -Fdc:description="some content" http://localhost:4502/content/dam/import/documents/2001/02/13/00003709-source.pdf/jcr%3Acontent/metadata

Update Title

curl -u admin:admin -Fjcr:title="Test" http://localhost:4502/content/geometrixx-outdoors/en/jcr%3Acontent | grep 'id="Message"' | sed 's/.*<div id="Message">\([^<]*\)<.*/\1/'