Curl to delete the folder in cloud instance | Community
Skip to main content
Level 3
January 15, 2025
Solved

Curl to delete the folder in cloud instance

  • January 15, 2025
  • 3 replies
  • 991 views

Hi team,

 

How can I delete this folder '/var/acs-commons/mcp/instances' in AEM Cloud instance with cUrl command.

 

Thanks,

SD

Best answer by Tethich

Hi @sdusane 

 

For AEMaaCS you can try something like:

curl -H "Authorizatin: Bearer [token]" -F":operation=delete" https://author-p[ProgramID]-e[EnvironmentID].adobeaemcloud.com/var/acs-commons/mcp/instances

 

Replace token, ProgramID, EnvironmentID with your project specific values. And try.

I recommend to do it on lower envs first, to see how it goes.

3 replies

MukeshYadav_
Community Advisor
Community Advisor
January 15, 2025
Tethich
Community Advisor
TethichCommunity AdvisorAccepted solution
Community Advisor
January 15, 2025

Hi @sdusane 

 

For AEMaaCS you can try something like:

curl -H "Authorizatin: Bearer [token]" -F":operation=delete" https://author-p[ProgramID]-e[EnvironmentID].adobeaemcloud.com/var/acs-commons/mcp/instances

 

Replace token, ProgramID, EnvironmentID with your project specific values. And try.

I recommend to do it on lower envs first, to see how it goes.

SDusaneAuthor
Level 3
January 17, 2025

Hi @tethich ,

 

I was trying this curl but its failing with unauthorised event, can you please check the curl and let me know if its working for you.

 

Thanks.

Tethich
Community Advisor
Community Advisor
January 17, 2025

I don't have access to a cloud instance at the moment. I see what I can do.

 

But meanwhile, I just observed I have a typo in my example. Instead of

Authorizatin

it should be

Authorization

 

AmitVishwakarma
Community Advisor
Community Advisor
January 19, 2025

To delete the folder /var/acs-commons/mcp/instances in an AEM Cloud instance using cURL: curl -u <username>:<password> -X DELETE "https://<aem-instance-url>/bin/rep:deleteNode.jsp?path=/var/acs-commons/mcp/instances"

  • Replace <username>, <password>, and <aem-instance-url> with your AEM credentials and instance URL.
  • This deletes the folder and its contents from the JCR repository.