Question

API to delete client

  • 20 February 2023
  • 5 replies
  • 99 views

Badge +7

Hi,

I am looking into https://documentation.commvault.com/v11/essential/45929_rest_api_delete_client.html

to delete clients. It is mentioned in the document that there is setting called ‘forceDelete’ - does anybody know how to use it in the actual API call?

 

I’ve tried to add it in the URL itself, in the headers, in the payload. Does not work.


5 replies

Userlevel 4
Badge +10

Hello @benjaminas 

It should be something like below, however I strongly recommend sticking with the retire client option instead as it has some logic in there to prevent the deletion of a client with valid jobs:

DELETE <webservice>/Client/{clientId}?forceDelete=true

and the recommended command:

DELETE <webservice>/Client/{clientId}/Retire

 

Badge +7

Hi @Graham Swift 

 

DELETE <webservice>/Client/{clientId}?forceDelete=true gives out Internal Error 500… Strange that documentation does not have example of how to use that.

Userlevel 4
Badge +10

Hello @benjaminas ,

 

Sorry for the delay, just got back to look in my lab.

It works as expected. Client was deleted from my environment. I am running 11.28.44.

 

Userlevel 4
Badge +10

Hello @benjaminas , just checking if you managed to crack it?

Badge +7

Hi @Graham Swift  yes..it seems that my user that I was using was lacking permissions..interesting that this is not reflected in the error code, instead giving me the internal server error 500.

Reply