I am automating the infrastructure and for the script I need to temporarily suspend the antivirus on the host. I found a description of the (terrible) API and in two days I came to the following: Use Session.StartSession -> get “sessionID” With “sessionID” -> use HostGroup.FindHosts -> get “RequestID” With “sessionID”, “RequestID” -> use ChunkAccessor.GetItemsChunk -> get “hostnameID” With “sessionID”, “hostnameID” -> use CgwHelper.GetNagentLocation -> get “locationObj” : { "PxgRetVal": { "GwLocHostId": "4f0737f2-9885-46f4-8437-3ba72e50103c", "GwLocIndirect": true, "GwLocLocation": "http://172.20.23.121:15000", "GwLocSignUdp": true, "GwLocTargetComponent": "1103;86;1.0.0.0;b736452e-8f9d-42b0-a6bc-251535210f7a", "GwLocUseCompression": true } } With “locationObj” as array → trying to use GatewayConnection.PrepareGatewayConnection: { "pLocations": [{ "GwLocHostId": "4f0737f2-9885-46f4-8437-3ba72e50103c", "GwLocIndirect": true, "GwLocLocation": "http://172.20.23.121:15000", "GwLocSignUdp": true, "GwLocTargetComponent": "1103;86;1.0.0.0;b736452e-8f9d-42b0-a6bc-251535210f7a", "GwLocUseCompression": true }] } And I get the error: { "PxgError": { "code": 1192, "file": "c:\\a\\b\\a_6vlf7p9h\\s\\csadminkit\\development2\\kloapi\\contentstream\\sax_handler.cpp", "line": 314, "message": "Field 'type' is not found for the value with name: ", "module": "KLSTD", "subcode": 0 } } At the same time, there is nothing useful in the documentation in this regard: What to do?