Question

Automate software installation through REST API

  • 1 November 2023
  • 1 reply
  • 48 views

Badge

Hi Vaulters,

I am new to Commvault and I am trying to use REST API to install DB2 on a client computer. This is what I have done and found so far:

1.I first used XML file generated by “Save as script” in Commcell console installation process and the JSON version of it, and used /InstallClient API which, according to the REST API reference, installs packages on a new client or an existing client. However this only gave a 500 error and no more information was provided. (The file is attached as File1.txt)

2.Then I tried to imitate the json sample given in the API reference of /InstallClient (https://documentation.commvault.com/v11/essential/130184_rest_api_post_install_client_associations.html) but the same 500 error code was returned. I think there are many important fields for DB2 that are never covered in the API reference. (This json request is attached as File2.txt)

3.After combining the content from 1. and format in 2., I somehow wrote a request accepted by the system and a job was launched with status code of 202. However, this job was completed after about 10s because "Install software skipped. Software selected for install is not supported on this client". After checking the job log on web console, I found that the value input in the request was not accepted because the log output "Packages selected For Install: " while a successful installation initiated from Commcell console output "Packages selected For Install: DB2 Agent" (This file is attached as File3.txt) 

So my question is, has anyone successfully used API to install DB2? What could be the correct format for a request to install DB2?

And suggestion is appreciated, thank you.


1 reply

Userlevel 7
Badge +19

@Cong have you looked into the option to perform the installation from Command Center? From Command Center center you can generate the API requests directly in JSON format. The other option where you could find information is https://api-next.commvault.com/

Unfortunately the automatic software deployment feature still doesn't support DB2. Would be nice if they start to support all supported agent types https://documentation.commvault.com/2023e/essential/114928_automatic_discovery_of_applications.html

Reply