Expand my Community achievements bar.

Don’t miss the AEM Skill Exchange in SF on Nov 14—hear from industry leaders, learn best practices, and enhance your AEM strategy with practical tips.
SOLVED

cURL command to move asset

Avatar

Level 5

Does anyone have a cURL command to move an asset from one directory to another?

1 Accepted Solution

Avatar

Correct answer by
Employee Advisor

Here you go-

 

curl -u admin:admin -X MOVE https://[aem_server]:[port]/api/assets/source/file.png -H "X-Destination: http://[aem_server]:[port]/api/assets/destination/file.png" -H "X-Overwrite: T"

View solution in original post

3 Replies

Avatar

Correct answer by
Employee Advisor

Here you go-

 

curl -u admin:admin -X MOVE https://[aem_server]:[port]/api/assets/source/file.png -H "X-Destination: http://[aem_server]:[port]/api/assets/destination/file.png" -H "X-Overwrite: T"

Avatar

Level 5
Hmmm, it seems this command is for 6.5. Do you have one for 6.3?