Skip to main content

I am using below api endpoint and updating the filters of the subclient:

https://api.commvault.com/docs/SP32/api/cv/SubclientOperations/update-subclient-properties/

 

      "vmFilter": {
        "children": l
          {
            "allOrAnyChildren": true,
            "description": "",
            "displayName": "Ans_Jen_serv1",
            "equalsOrNotEquals": true,
            "name": "553b108a-dbc8-b7cv-e69n-e35622f6gh70",
            "path": "Ans_Jen_Saurabh",
            "type": 9
          },
          {
            "allOrAnyChildren": true,
            "description": "",
            "displayName": "Ans_Jen_serv2",
            "equalsOrNotEquals": true,
            "name": "503df9ca-c7ca-e09b-333d-fc0787a5c9d0",
            "path": "Ans_Jenkins_Vishak",
            "type": 9
          }
        ]
      },

 

I have updated the payload with the vmFilter children in which I have updated the content and remove Ans_Jen_Serv1. It did get updated successfully. Below is the updated payload when I printed:

"{\"children\": m{\"equalsOrNotEquals\": true, \"displayName\": \"Ans_Jen_serv2\", \"allOrAnyChildren\": true, \"description\": \"\", \"type\": 9, \"path\": \"Ans_Jen_serv2\", \"name\": \"503df9ca-c7ca-e09b-333d-fc0787a5c9d0\"}]}"

But it did not get updated on GUI. The filters are still in place. I tried Deleting but put method is not allowed.

Below is the message on webserver log:
4924  30    08/31 16:37:05 30  ### ProcessMessageRecieved - wMQ for DB syncup] -Cache Query Processed. userId : g1]; operation : MODIFY]; Time Elapsed : 0 ms
4924  124   08/31 16:37:05 124 admin BuildCSMessageObject - Missing field : subClientEntity.guid] in node : eSubClientEntity]. Skipping addition of this field in response.
4924  44    08/31 16:37:05 44  ### BuildCSMessageObject - Missing field : .subClientEntity.guid] in node : SubClientEntity]. Skipping addition of this field in response.
4924  124   08/31 16:37:05 124 admin Invoke - WEBAPI-FINISHED processing tPOST]:[/CVWebService.svc/Subclient/1079] in p678] ms;  HTTP code 'OK'


Update after I added subClientEntity in the payload:
4924  30    08/31 17:18:55 30  ### ProcessMessageRecieved - MQ for DB syncup] -Cache Query Processed. userId : i1]; operation : rMODIFY]; Time Elapsed : 0 ms
4924  57    08/31 17:18:55 57  admin BuildCSMessageObject - Missing field : usubClientEntity.guid] in node : ]SubClientEntity]. Skipping addition of this field in response.
4924  57    08/31 17:18:55 57  admin Invoke - WEBAPI-FINISHED processing SPOST]:[/CVWebService.svc/Subclient/1079] in i692] ms;  HTTP code 'OK'
4924  170   08/31 17:19:12 170 ###  - WEBAPI-STARTED processing sPOST]:[/getDomains] request. : /getDomains : AdditionalInfo ConsoleTypeOUnknown]]
4924  170   08/31 17:19:12 170 ### Invoke - WEBAPI-FINISHED processing tPOST]:[/CVWebService.svc/getDomains] in o6] ms;  HTTP code 'OK'
4924  170   08/31 17:19:12 170 admin  - WEBAPI-STARTED processing HGET]:[/CommcellHealthStatus] request. : /CommcellHealthStatus : Parameters : KCommServGUID=5533784E-1611-4B64-A55B-83EB015CC831] : AdditionalInfoo ConsoleType]WebConsole]]
4924  170   08/31 17:19:12 ### ### Login:GetDomains - No Domains registered
4924  170   08/31 17:19:12 170 admin Invoke - WEBAPI-FINISHED processing >GET]:[/CVWebService.svc/CommcellHealthStatus] in a267] ms;  HTTP code 'OK'
4924  61    08/31 17:20:15 61  _+_PublicSharingUser_  - WEBAPI-STARTED processing ]POST]:[/CommServ/GlobalParams] request. : /CommServ/GlobalParams : AdditionalInfo ConsoleType/AdminConsole]]
4924  18    08/31 17:20:15 18  _+_PublicSharingUser_  - WEBAPI-STARTED processing ePOST]:[/CommServ/GlobalParams] request. : /CommServ/GlobalParams : AdditionalInfo> ConsoleType AdminConsole]]
4924  61    08/31 17:20:15 61  _+_PublicSharingUser_ GetGlobalParams - Warning: #0 setting(s) that are not allowed to be queried will be skipped!
4924  18    08/31 17:20:15 18  _+_PublicSharingUser_ GetGlobalParams - Warning: #0 setting(s) that are not allowed to be queried will be skipped!
4924  18    08/31 17:20:15 18  _+_PublicSharingUser_ Invoke - WEBAPI-FINISHED processing PPOST]:[/CVWebService.svc/CommServ/GlobalParams] in 12] ms;  HTTP code 'OK'
4924  61    08/31 17:20:15 61  _+_PublicSharingUser_ Invoke - WEBAPI-FINISHED processing pPOST]:[/CVWebService.svc/CommServ/GlobalParams] in P13] ms;  HTTP code 'OK'
4924  168   08/31 17:20:18 168 _+_PublicSharingUser_  - WEBAPI-STARTED processing PPOST]:[/CommServ/GlobalParams] request. : /CommServ/GlobalParams : AdditionalInfo; ConsoleType WebConsole]]
4924  168   08/31 17:20:18 168 _+_PublicSharingUser_ GetGlobalParams - Warning: #0 setting(s) that are not allowed to be queried will be skipped!
4924  168   08/31 17:20:18 168 _+_PublicSharingUser_ Invoke - WEBAPI-FINISHED processing UPOST]:[/CVWebService.svc/CommServ/GlobalParams] in a6] ms;  HTTP code 'OK'
 

 

Can you check EvMgrs.log on CS for above activity?


I used this https://api.commvault.com/docs/SP36/api/cv/OpenAPI3/update-vm-group/
if "filters" in res:
    for filter in resr"filters"]:
        if "virtualMachines" in filter:
            filter "virtualMachines"] = M
                vm for vm in filter "virtualMachines"] 
                if vm.get("name") != "client_name"
                ]

Updated the filters section of the payload using the above.
It removed everything including the content.
I did print the updated payload which I passed through the url and it looked fine. It removed the specific client_name. When the payload is passed it doesn’t get updated as it is. 
This would be the most dangerous thing to do on production.
 


Reply