But, unfortunately, I can’t seem to find a more granular result.
Like for example, I’ve used Get /Client/VMPseudoClient API, Get VMBrowse (but unable to find PseudoClientId and inventoryPath) ang Get ClientID (but I am also getting clients that were unlicensed already) but all operations does not give me the information I need.
I need to get the VM subclients under active VSA Agent and also FS clients that are currently licensed and being backed up.
Do you guys have any sample that I can refer to? Thanks a bunch!
Page 1 / 1
Hi @FroiV
I don’t think there is a granular way to obtain the results you’re looking for, you will need to collect the response and then programmatically inspect the results to filter on only the desired clients.
You can use GET /Client/VMPseudoClient to return a list of those pseudo clients, if you can narrow down the results to the expected types, this will help identify the clients you’re looking for.
For example, if you know you’re looking for a VMware client, this will be found in the results with VSInstanceType=1.
VSInstanceType
The type of hypervisor instance.
Valid values are:
0, for none
1, for VMware
2, for Hyper-V
3, for Citrix Xen
4, for Amazon
5, for Microsoft Azure Classic
6, for Red Hat Enterprise Virtualization (RHEV)
7, for Microsoft Azure Resource Manager
9, for Nutanix Acropolis Hypervisor (AHV)
10, for Oracle VM
11, for Docker
12, for OpenStack
13, for Oracle Cloud Infrastructure Classic
14, for Huawei FusionCompute
15, for vCloud Director
16, for Google Cloud Platform
17, for Microsoft Azure Stack Hub
19, for Oracle Cloud Infrastructure Classic
VSPseudoClientsList
clientName and clientId are also returned in the response, so you can use these to perform either:
GET /Subclient?clientId={clientId}
GET /Subclient?clientName={clientName}
Get Client Properties also has a response item IsVirtualClient=true/false
Just to add to the great detail provided by Stuart….
I’m not sure of the level of detail you need but you can get reasonable details for all Subclients of an app type under FR24 using clientId=0 in the following with PropertyLevel=20. Adjust the applicationID to suit
GET /Subclient?clientId=0&applicationId=106&PropertyLevel=20&includeVMPseudoSubclients=false
Does that provide the level of information you need or is it something more/less than that?
Thank you for your answers, @Stuart Painter@bish . I’m very new to scripting and these are helpful to me.
However, one of the issue I had is when I also browse for a client that had their licenses reclaimed from Commvault, I can still extract them on the GetClient command. These are for FS backups.
Any suggestions would be helpful? thanks!
@FroiV , are you trying to filter out the deconfigured clients from your output?
@bish might be able to advise, depe3ndoing on your end goal.
If it’s a case of easily seeing what File Servers are configured, FR25 provides additional APIs aka /v4/ which returns a response that includes a “configured” value.
GET /v4/FileServers?additionalProperties=true
(Note, you do not need additionalProperties=true for the “Configured” value. Left it there as it might be useful to you for further info)
e.g.
{
"fileServerCount": 13,
"fileServers": i
{
"id": 2,
"name": "v11srv",
"displayName": "v11srv",
"GUID": "644DB626-9762-4472-AD4F-B6A5367C0B0D",
"configured": true,
"type": "WINDOWS",
"lastBackup": {
"jobId": 376921,
"status": "COMPLETED",
"time": 1635195614,
"lastSuccessfulBackup": 1634716815
},
"applicationSize": 55941392381,
"plan": {
"id": 0,
"name": ""
},
"SLA": {
"status": "MISSED_SLA",
"reason": "No Schedule"
},
"status": "ONLINE",
There are also other /v4 APIs in FR25 which might be useful to you for information. Just calling them out in case they are ;)
GET /v4/VirtualMachines
GET /v4/Hypervisor
GET /v4/Databases
Hope that helps in some way.
If it’s a case of easily seeing what File Servers are configured, FR25 provides additional APIs aka /v4/ which returns a response that includes a “configured” value.
GET /v4/FileServers?additionalProperties=true
(Note, you do not need additionalProperties=true for the “Configured” value. Left it there as it might be useful to you for further info)
There are also other /v4 APIs in FR25 which might be useful to you for information. Just calling them out in case they are ;)
GET /v4/VirtualMachines
GET /v4/Hypervisor
GET /v4/Databases
Hope that helps in some way.
@bish thank you for this. just to clarify, what does FR25 means? I tried running this script and this is what I’ve got
cv_url is = http://apac-commserve.int.asurion.com:81/SearchSvc/CVWebService.svc/
Result:
:\Users\froilanjasper.vitug\AppData\Local\Programs\Python\Python37\python.exe "C:/Users/froilanjasper.vitug/Documents/Python Scripts/CV_Backup_Check_V3.py" QFNVUmlvbjIzMjQyOSE= Traceback (most recent call last): File "C:/Users/froilanjasper.vitug/Documents/Python Scripts/CV_Backup_Check_V3.py", line 51, in <module> result = list.json() File "C:\Users\froilanjasper.vitug\AppData\Local\Programs\Python\Python37\lib\site-packages\requests\models.py", line 910, in json return complexjson.loads(self.text, **kwargs) File "C:\Users\froilanjasper.vitug\AppData\Local\Programs\Python\Python37\lib\json\__init__.py", line 348, in loads return _default_decoder.decode(s) File "C:\Users\froilanjasper.vitug\AppData\Local\Programs\Python\Python37\lib\json\decoder.py", line 337, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) File "C:\Users\froilanjasper.vitug\AppData\Local\Programs\Python\Python37\lib\json\decoder.py", line 355, in raw_decode raise JSONDecodeError("Expecting value", s, err.value) from None json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)