Expand my Community achievements bar.

SOLVED

Curl to delete the folder in cloud instance

Avatar

Level 4

Hi team,

 

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

 

Thanks,

SD

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

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.

View solution in original post

6 Replies

Avatar

Community Advisor

Avatar

Correct answer by
Community Advisor

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.

Avatar

Level 4

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.

Avatar

Community Advisor

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

 

Avatar

Level 4

Hi @Tethich 

 

It worked with correct spelling.

 

Thank you so much for the help!!!!

 

Regards,

SD

Avatar

Community Advisor

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.