Skip to main content
  • I need an API endpoint to fetch the subclient id.
  • For testing purpose I copied the ID from the url: https://win-igicqf1affn/commandcenter/#/collectionDetails/content/3/10
  • In the above mentioned URL 10 is the subclient id. I have used it in other API endpoints.
  • But when I use the api in order to fetch the subclient id it gives me 14 instead of 10.
  • Below are the links to APIs I have been manipulating.

https://api.commvault.com/docs/SP34/api/cv/VirtualizationOperations/update-subclient-virtual-machine-content

https://api.commvault.com/docs/SP34/api/cv/SubclientOperations/get-subclient-properties

  • The api that is giving me a different subclient id:

https://api.commvault.com/docs/SP34/api/cv/SubclientOperations/get-subclient-id

import requests
import json

url = "https://win-igicqf1affn/commandcenter/api/subclient?clientId=8"

payload={}
headers = {
'Accept': 'application/json',
'Authtoken': 'token'
}

response = requests.request("GET", url, headers=headers, data=payload, verify=False)

pretty_json = json.loads(response.text)
data = json.dumps(pretty_json, indent=2, sort_keys=True)
print(data)
c:\APIs>py GetSubclientId.py
C:\Users\Ansible_user\AppData\Roaming\Python\Python312\site-packages\urllib3\connectionpool.py:1103: InsecureRequestWarning: Unverified HTTPS request is being made to host 'win-igicqf1affn'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#tls-warnings
warnings.warn(
{
"filterQueryCount": 1,
"subClientProperties":
{
"analyticsSubclientProp": {},
"cassandraProps": {},
"dcPlanEntity": {},
"dfsSubclientProp": {},
"planEntity": {},
"proxyClient": {},
"region": {},
"splunkProps": {},
"subClientEntity": {
"_type_": 7,
"appName": "Virtual Server",
"applicationId": 106,
"backupsetId": 12,
"backupsetName": "defaultBackupSet",
"clientId": 8,
"clientName": "Ash_win19",
"commCellName": "win-igicqf1affn",
"csGUID": "AED8C433-93CB-4A67-80C9-FFFCD116C127",
"displayName": "Ash_win19",
"entityInfo": {
"companyId": 0,
"companyName": "Commcell"
},
"instanceId": 2,
"instanceName": "VMInstance",
"subclientGUID": "AA990D70-538D-401F-A6E1-9FCC9A01A647",
"subclientId": 14,
"subclientName": "testing_tobedeleted"
},
"taPlanEntity": {},
"useLocalArchivalRules": false,
"useLocalContent": false
}
]
}

        "subclientId": 14,
        "subclientName": "testing_tobedeleted"

  • The above subclient id retrieved from API doesn’t work whereas the one on the url works perfectly.
  • Are they different IDs? What API to use to get the correct subclient id that actually works?

After checking further. When I use the API to fetch subclient properties using the subclient id from url i.e.10 and subclient id from api call i.e.14 I get 2 different output but subclient name remains the same.

Below output is with id 14:

{
"subClientProperties": [
{
"analyticsSubclientProp": {},
"canChangeEncryptionSetting": false,
"cassandraProps": {},
"commonProperties": {
"UNCScriptCredentialinfo": {
"credentialId": 0,
"credentialName": ""
},
"allowVssForSnapbackup": false,
"associatedPolicy": {
"subclientPolicyId": 0
},
"associatedSnapShotSCId": {
"_type_": 7
},
"dedupeRatio": 0,
"disableArchivingTurboRule": false,
"enableBackup": true,
"enableBackupAfterDelay": false,
"enableBackupAtDateTime": {
"TimeZoneID": 0,
"time": 0
},
"encryptionFlag": 2,
"firstBackupTime": 0,
"guestCredentialinfo": {
"credentialId": 0,
"credentialName": ""
},
"idaType": 0,
"impersonateUserCredentialinfo": {
"credentialId": 0,
"credentialName": ""
},
"indexCycleToEveryBackupJobs": 100,
"indexingBackupSubClient": false,
"isActivityDisabledFromPolicy": false,
"isAdAppAwareSubclient": false,
"isDefaultSubclient": true,
"isETCDSubclient": false,
"isTrueUpOptionEnabled": false,
"lastBackupSize": 0,
"lastBackupTime": 0,
"nextBackupTime": 0,
"numberOfBackupStreams": 5,
"onBoardCompanyId": 0,
"prepostCredentialinfo": {
"credentialId": 0,
"credentialName": ""
},
"prepostProcess": {
"prepostUserName": {},
"runPostBackup": 0,
"runPostLog": 0,
"runPostScan": 0
},
"runAs": 0,
"runTrueUpJobAfterDays": 30,
"security": {
"advancedPrivacySettings": {
"authType": 1,
"isPasskeyFeatureEnabled": false,
"isPrivacyFeatureEnabled": false,
"passkeySettings": {
"enableAuthorizeForRestore": false,
"expirationTime": {
"time": 0
}
}
},
"associatedUserGroups": [
{
"_type_": 15,
"userGroupId": 1,
"userGroupName": "master"
}
],
"ownerCapabilities": {}
},
"securityAssociations": {
"ownerAssociations": {},
"tagWithCompany": {
"providerDomainName": "Commcell",
"providerId": 0
}
},
"sizeOnMedia": 0,
"slaCategory": 0,
"slaCategoryDescription": "N/A",
"slaStatus": 3,
"snapCopyInfo": {
"IsOracleSposDriverEnabled": false,
"configuredSybaseInstance": {
"_type_": 5
},
"isRMANEnableForTapeMovement": false,
"isSnapBackupEnabled": false,
"quiesceImpersonateUser": {},
"separateProxyForSnapToTape": {
"_type_": 3
},
"snapToTapeProxyToUse": {
"_type_": 3
},
"snapToTapeSelectedEngine": {
"_type_": 110
},
"sqlUser": {},
"sshKey": {},
"sybaseUser": {},
"useProxyForSQLIntegrity": {},
"vmApplicationUser": {}
},
"storageDevice": {
"dataBackupStoragePolicy": {
"_type_": 17,
"storagePolicyId": 4,
"storagePolicyName": "testing"
},
"deDuplicationOptions": {
"enableDeduplication": true,
"generateSignature": 1
},
"logBackupStoragePolicy": {
"_type_": 17
},
"performanceMode": {
"enableMultiplexing": false,
"lookAheadReaderSlots": 4,
"multiplexingValid": false,
"muxFactor": 0,
"numOfPipelineBuffers": 180,
"perfCRCDetails": [
{
"crcOverMedia": true,
"crcOverNetwork": true,
"perfMa": "win-igicqf1affn",
"perfMaId": 2
}
],
"perfClientName": "Ash_win19",
"perfCopyName": "Primary",
"perfSPName": "testing",
"pipelineBufferSize": 64,
"streamsOverMux": false
}
},
"subClientPropertiesFlag": 0,
"subclientPolicy": {
"_type_": 65,
"subclientPolicyName": ""
},
"totalBackupSize": 0,
"turboNASClient": {
"_type_": 3
},
"vmBackupValidationSettings": {
"backupValidationThreadCount": 0,
"isAppValidationEnabled": false,
"isCustomAppEnabled": false,
"runAsDevTestGroup": false,
"subTaskId": 0,
"taskId": 0,
"uncScriptImpersonateUser": {
"userName": "0"
},
"useSourceVMEsxToMount": false
}
},
"dcPlanEntity": {},
"dfsSubclientProp": {},
"hcSubclientProp": {},
"planEntity": {},
"proxyClient": {},
"region": {},
"splunkProps": {},
"status": 2097160,
"subClientEntity": {
"_type_": 7,
"appName": "Virtual Server",
"applicationId": 106,
"backupsetId": 12,
"backupsetName": "defaultBackupSet",
"clientId": 8,
"clientName": "Ash_win19",
"commCellName": "win-igicqf1affn",
"csGUID": "AED8C433-93CB-4A67-80C9-FFFCD116C127",
"displayName": "Ash_win19",
"entityInfo": {
"companyId": 0,
"companyName": "Commcell"
},
"instanceId": 2,
"instanceName": "VMInstance",
"subclientGUID": "AA990D70-538D-401F-A6E1-9FCC9A01A647",
"subclientId": 14,
"subclientName": "testing_tobedeleted"
},
"taPlanEntity": {},
"useLocalArchivalRules": true,
"useLocalContent": false,
"vmBackupInfo": {
"vmBackedUpWithErrorCount": 0,
"vmNeverBackedUpCount": 0,
"vmNotProtectedCount": 0,
"vmPendingCount": 0,
"vmProtectedCount": 0,
"vmTotalCount": 0
},
"vmContent": {},
"vmDiskFilter": {},
"vmFilter": {},
"vsaSubclientProp": {
"appBasedBackup": false,
"customSnapshotResourceGroup": "",
"customSnapshotTags": {},
"datastoreFreespaceCheck": true,
"destinationAccount": {
"amazonClient": {}
},
"proxies": {},
"proxyESXServer": {
"vsInstance": {
"appName": "Virtual Server",
"applicationId": 106,
"clientId": 3,
"clientName": "lol",
"displayName": "lol",
"instanceId": 4,
"instanceName": "VMware"
}
},
"regionalSnapshot": true,
"useChangedTrackingOnVM": false,
"useVMCheckpointSetting": false
}
}
]
}

Below is after I run the api using id 10:
 

  warnings.warn(
{
"subClientProperties":
{
"analyticsSubclientProp": {},
"canChangeEncryptionSetting": false,
"cassandraProps": {},
"commonProperties": {
"UNCScriptCredentialinfo": {
"credentialId": 0,
"credentialName": ""
},
"allowMultipleDataReaders": false,
"allowVssForSnapbackup": false,
"associatedPolicy": {
"subclientPolicyId": 0
},
"associatedSnapShotSCId": {
"_type_": 7,
"subclientId": 0
},
"dedupeRatio": 76.44684,
"disableArchivingTurboRule": false,
"enableBackup": true,
"enableBackupAfterDelay": false,
"enableBackupAtDateTime": {
"TimeZoneID": 0,
"time": 0
},
"encryptionFlag": 2,
"firstBackupTime": 1716350412,
"guestCredentialinfo": {
"credentialId": 0,
"credentialName": ""
},
"idaType": 0,
"impersonateUserCredentialinfo": {
"credentialId": 0,
"credentialName": ""
},
"indexCycleToEveryBackupJobs": 100,
"indexingBackupSubClient": false,
"isActivityDisabledFromPolicy": false,
"isAdAppAwareSubclient": false,
"isETCDSubclient": false,
"isTrueUpOptionEnabled": false,
"lastBackupJobInfo": {
"commCellID": 2,
"endTime": {
"time": 1716868812
},
"failureReasonIds": "38,",
"failureReasonMessageEnglish": "All activity on CommServe is disabled. The job will not run because activity is disabled.<br>Source: win-igicqf1affn, Process: JobManager",
"jobID": 66,
"startTime": {
"time": 1716868812
},
"status": 9
},
"lastBackupSize": 573675003,
"lastBackupTime": 1716782416,
"nextBackupTime": 0,
"numberOfBackupStreams": 5,
"onBoardCompanyId": 0,
"prepostCredentialinfo": {
"credentialId": 0,
"credentialName": ""
},
"prepostProcess": {
"prepostUserName": {},
"runPostBackup": 0,
"runPostLog": 0,
"runPostScan": 0
},
"runAs": 0,
"runTrueUpJobAfterDays": 30,
"security": {
"advancedPrivacySettings": {
"authType": 1,
"isPasskeyFeatureEnabled": false,
"isPrivacyFeatureEnabled": false,
"passkeySettings": {
"enableAuthorizeForRestore": false,
"expirationTime": {
"time": 0
}
}
},
"associatedUserGroups":
{
"_type_": 15,
"userGroupId": 1,
"userGroupName": "master"
}
],
"ownerCapabilities": {}
},
"securityAssociations": {
"ownerAssociations": {},
"tagWithCompany": {
"providerDomainName": "Commcell",
"providerId": 0
}
},
"sizeOnMedia": 6837977924,
"slaCategory": 11,
"slaCategoryDescription": "Excluded Server Type",
"slaStatus": 3,
"snapCopyInfo": {
"IsOracleSposDriverEnabled": false,
"configuredSybaseInstance": {
"_type_": 5
},
"isRMANEnableForTapeMovement": false,
"isSnapBackupEnabled": false,
"quiesceImpersonateUser": {},
"separateProxyForSnapToTape": {
"_type_": 3
},
"snapToTapeProxyToUse": {
"_type_": 3
},
"snapToTapeSelectedEngine": {
"_type_": 110
},
"sqlUser": {},
"sshKey": {},
"sybaseUser": {},
"transportModeForVMWare": 0,
"useProxyForSQLIntegrity": {},
"vmApplicationUser": {}
},
"storageDevice": {
"dataBackupStoragePolicy": {
"_type_": 17,
"storagePolicyId": 4,
"storagePolicyName": "testing"
},
"deDuplicationOptions": {
"enableDeduplication": true,
"generateSignature": 1
},
"logBackupStoragePolicy": {
"_type_": 17
},
"networkAgents": 2,
"performanceMode": {
"enableMultiplexing": false,
"lookAheadReaderSlots": 4,
"multiplexingValid": false,
"muxFactor": 0,
"numOfPipelineBuffers": 180,
"perfCRCDetails":
{
"crcOverMedia": true,
"crcOverNetwork": true,
"perfMa": "win-igicqf1affn",
"perfMaId": 2
}
],
"perfClientName": "lol",
"perfCopyName": "Primary",
"perfSPName": "testing",
"pipelineBufferSize": 64,
"streamsOverMux": false
},
"softwareCompression": 2,
"throttleNetworkBandwidth": 0
},
"subClientPropertiesFlag": 0,
"subclientPolicy": {
"_type_": 65,
"subclientPolicyName": ""
},
"totalBackupSize": 0,
"turboNASClient": {
"_type_": 3
},
"vmBackupValidationSettings": {
"backupValidationThreadCount": 0,
"isAppValidationEnabled": false,
"isCustomAppEnabled": false,
"runAsDevTestGroup": false,
"subTaskId": 0,
"taskId": 0,
"uncScriptImpersonateUser": {
"userName": "0"
},
"useSourceVMEsxToMount": false
}
},
"dcPlanEntity": {},
"dfsSubclientProp": {},
"hcSubclientProp": {},
"planEntity": {
"planId": 1,
"planName": "testing",
"planSubtype": 33554437,
"planType": 2
},
"proxyClient": {
"clientId": 2,
"clientName": "win-igicqf1affn"
},
"region": {},
"splunkProps": {},
"status": 0,
"subClientEntity": {
"_type_": 7,
"appName": "Virtual Server",
"applicationId": 106,
"backupsetId": 8,
"backupsetName": "defaultBackupSet",
"clientId": 3,
"clientName": "lol",
"commCellName": "win-igicqf1affn",
"csGUID": "AED8C433-93CB-4A67-80C9-FFFCD116C127",
"displayName": "lol",
"entityInfo": {
"companyId": 0,
"companyName": "Commcell"
},
"instanceId": 4,
"instanceName": "VMware",
"subclientGUID": "A4D866FE-CCEB-4C6C-9ABC-B9406CE43FF3",
"subclientId": 10,
"subclientName": "testing_tobedeleted"
},
"taPlanEntity": {},
"useLocalArchivalRules": true,
"useLocalContent": false,
"vmBackupInfo": {
"vmBackedUpWithErrorCount": 0,
"vmNeverBackedUpCount": 0,
"vmNotProtectedCount": 0,
"vmPendingCount": 0,
"vmProtectedCount": 3,
"vmTotalCount": 3
},
"vmContent": {
"children":
{
"allOrAnyChildren": true,
"displayName": "Ans_Jen_Pramod",
"equalsOrNotEquals": true,
"name": "52c0fb3f-9cf0-ea0c-6518-ff20a5d37a6f",
"path": "Ans_Jen_Pramod",
"type": 9
},
{
"allOrAnyChildren": true,
"description": "",
"displayName": "Ans_Jenkins_Vishak",
"equalsOrNotEquals": true,
"name": "503be9bc-b6ba-e09b-333d-dc0484a5c9d0",
"path": "Ans_Jenkins_Vishak",
"type": 9
}
]
},
"vmDiskFilter": {},
"vmFilter": {},
"vmSLAInfo": {
"vmExcludedCount": 0,
"vmMetSLACount": 3,
"vmMissedSLACount": 0
},
"vsaSubclientProp": {
"appBasedBackup": false,
"autoDetectVMOwner": false,
"customSnapshotResourceGroup": "",
"customSnapshotTags": {},
"datastoreFreespaceCheck": true,
"destinationAccount": {
"amazonClient": {}
},
"proxies": {},
"proxyESXServer": {
"vsInstance": {
"appName": "Virtual Server",
"applicationId": 106,
"clientId": 3,
"clientName": "lol",
"displayName": "lol",
"instanceId": 4,
"instanceName": "VMware"
}
},
"quiesceGuestFileSystemAndApplications": true,
"regionalSnapshot": true,
"useChangedTrackingOnVM": true,
"useVMCheckpointSetting": true,
"vendorType": 1,
"virtualServerRetention": {
"retentionOverride": false,
"snapCopiesToRetain": 3
}
}
}
]
}

 


In both the above api calls subclient entity is different:

   "subClientEntity": {
"_type_": 7,
"appName": "Virtual Server",
"applicationId": 106,
"backupsetId": 8,
"backupsetName": "defaultBackupSet",
"clientId": 3,
"clientName": "lol",
"commCellName": "win-igicqf1affn",
"csGUID": "AED8C433-93CB-4A67-80C9-FFFCD116C127",
"displayName": "lol",
"entityInfo": {
"companyId": 0,
"companyName": "Commcell"
},
"instanceId": 4,
"instanceName": "VMware",
"subclientGUID": "A4D866FE-CCEB-4C6C-9ABC-B9406CE43FF3",
"subclientId": 10,
"subclientName": "testing_tobedeleted"
},
  "subClientEntity": {
"_type_": 7,
"appName": "Virtual Server",
"applicationId": 106,
"backupsetId": 12,
"backupsetName": "defaultBackupSet",
"clientId": 8,
"clientName": "Ash_win19",
"commCellName": "win-igicqf1affn",
"csGUID": "AED8C433-93CB-4A67-80C9-FFFCD116C127",
"displayName": "Ash_win19",
"entityInfo": {
"companyId": 0,
"companyName": "Commcell"
},
"instanceId": 2,
"instanceName": "VMInstance",
"subclientGUID": "AA990D70-538D-401F-A6E1-9FCC9A01A647",
"subclientId": 14,
"subclientName": "testing_tobedeleted"
},

One has Vcenter as client and other has VM as client. By running the get subclient id I am getting the Subclient id for VM Ash_win19 entity and not for Vcenter. The Vcenter one is the correct one.


Reply