Connect. Communicate. Collaborate. Securely.

Home » Kerio User Forums » Blog » Antivirus SDK: How to configure plugin options through Administration API (Blog)
  •  
Anonymous
Karma:
When creating an antivirus plugin you would probably need some config option to setup as described in SDK documentation.

Take a look on sample implementation. There is a list of options.


avir_plugin_config plugin_config[] = {
{"Option 1", "0"},
{"Option 2", "a string"},
{"", ""} // mandatory terminating pair of two empty strings
};


But how to change configuration of the plugin without need to edit config files directly? That's what is Administration API for Kerio Connect designed for.

There is a method Content.setAntivirusSetting (reference documentation) where you can send all your config options with its values.

It is defined also as a list of options with the following data structure.

See sample JSON request for my plugin configuration:

{
"jsonrpc": "2.0",
"id": 1,
"method": "Content.setAntivirusSetting",
"params": {
"setting": {
"useExternal": true,
"selectedId": "avir_myplugin",
"plugins": [
{
"id": "avir_myplugin",
"options": [
{
"name": "Option 1",
"content": "1000"
},
{
"name": "Option 2",
"content": "This is new value"
}
]
}
]
}
}
}


Options can be set individually or all at once.

If you need to read the configuration, use the Content.getAntivirusSetting method.

For more information about Antivirus SDK see our Developer Zone.
Original article available on our blog.
Previous Topic: Samepage Shines When You Need to Work with Continously Evolving Groups of People
Next Topic: Kerio Control 8 with IPsec - Let the migration begin...
Goto Forum:
  


Disclaimer:
Kerio discussion forums are intended for open communication between forum members and may contain information and material posted by members which may be useful in learning about Kerio products. The discussion forums are not intended to provide technical support for any specific product. Any information implied or expressed in the discussion forums is that of the posting member. Kerio is in no way responsible for the information posted in the forums, or its accuracy. Kerio employees may participate in the discussions, but their postings do not represent an offical position of the company on any issues raised or discussed. Kerio reserves the right to monitor and maintain the forums to promote free and accurate exchange of information.

Current Time: Fri Sep 22 12:04:31 CEST 2017

Total time taken to generate the page: 0.00356 seconds
.:: Contact :: Home ::.
Powered by: FUDforum 3.0.4.