- 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/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?
