Skip to main content
Solved

Rename a clientname via API


Juergen
Byte
Forum|alt.badge.img+8

Hello,

I want to rename a client via API, but it doesn’t want to work, I use following:

http://testcommcell.xxx.com:81/SearchSvc/CVWebService.svc/Client/<ClientID>

XML file looks like :

<association>

    <entity>

      <clientName> "<cname>" </clientName>

    </entity>

  </association>

  <clientProperties>

      <clientEntity>

        <clientName> "<cname>_decom_07.10.2021" </clientName>

      </clientEntity>

  </clientProperties>

</App_SetClientPropertiesRequest>

error : <Api_GenericResp errorMessage="Failed to set Client properties." errorCode="1" />

Environment: V11SP20.55

Any idea what I do wrong?

regards Juergen

Best answer by Kcsaby

Juergen 

Please review the following doc link - there is an example that you can use to change the client’s name

https://documentation.commvault.com/11.24/expert/7051_changing_client_computer_name_using_command_line_interface.html

this is done on a command line but the XML file that is there can be used elsewhere as well as a base of what you wish to do.

qoperation execute -af update_client_name_template.xml -entity/clientName 'old_clientname' -client/clientEntity/clientName 'old_clientname' -entity/newName 'new_clientname'

You can also edit the update_client_name_template.xml for your needs with out all the command line options shown

 

View original
Did this answer your question?

5 replies

Mike Struening
Vaulter
Forum|alt.badge.img+23

Hey @Juergen , thanks for the post!

My initial suspicion is that the cname variable needs to be outside of the quotes, though the generic error message is, well….generic.

I’ll add in some of our folks who are better skilled at our API calls to help.


Juergen
Byte
Forum|alt.badge.img+8
  • Author
  • Byte
  • 41 replies
  • August 25, 2021

Hi @Mike Struening , thanks for answer.

I think that was bad sample for placeholder, it looks so:

<clientName> "FQDN" </clientName>

and 

<clientName> "FQDN_decom_07.10.2021" </clientName>

rename from FQDN  to FQDN_decom_07.10.2021

I hope that explains better

 

Juergen


Forum|alt.badge.img+2
  • Vaulter
  • 5 replies
  • Answer
  • August 25, 2021

Juergen 

Please review the following doc link - there is an example that you can use to change the client’s name

https://documentation.commvault.com/11.24/expert/7051_changing_client_computer_name_using_command_line_interface.html

this is done on a command line but the XML file that is there can be used elsewhere as well as a base of what you wish to do.

qoperation execute -af update_client_name_template.xml -entity/clientName 'old_clientname' -client/clientEntity/clientName 'old_clientname' -entity/newName 'new_clientname'

You can also edit the update_client_name_template.xml for your needs with out all the command line options shown

 


Juergen
Byte
Forum|alt.badge.img+8
  • Author
  • Byte
  • 41 replies
  • August 26, 2021

Hello @Kcsaby,

Now I got it working! Thank You.

A second problem was the quotes at the name now it looks:

<App_SetClientPropertiesRequest>
  <association>
    <entity>
        <clientName>FQDN</clientName>
        <newName>FQDN_decom_07.10.2021</newName>
    </entity>
  </association>
  <clientProperties>
    <client>
      <clientEntity>
        <clientName>FQDN</clientName>
      </clientEntity>
    </client>
  </clientProperties>
</App_SetClientPropertiesRequest>

Juergen


Forum|alt.badge.img+2
  • Vaulter
  • 5 replies
  • August 26, 2021

Glad that worked out for you and I was able to help you.

Ken


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings