Go to documentation repository
Previous page Next page
Templates allow you to apply the same preset parameters to cameras.
Note
If a template has been assigned to the camera but has not yet been applied, then the response to the ListUnits method (see gRPC API 메서드를 사용하여 장치 관리 (ConfigurationService)) will contain the parameter "has_unapplied_templates": true.
{ "method": "axxonsoft.bl.config.ConfigurationService.ListTemplates", "data": { "view": "VIEW_MODE_FULL" } }
{ "method": "axxonsoft.bl.config.ConfigurationService.ChangeTemplates", "data": { "created": [ { "id": "8a7a73d7-ca8c-4a09-b7f0-7b45ef9cfe8d", "name": "Hikvision DS-2CD2135FWD-I", "unit": { "uid": "hosts/Server1/DeviceIpint.13", "type": "DeviceIpint", "properties": [ { "id": "vendor", "readonly": false, "value_string": "Hikvision" }, { "id": "model", "readonly": false, "value_string": "DS-2CD2135FWD-I" }, { "id": "user", "readonly": false, "value_string": "admin" }, { "id": "password", "readonly": false, "value_string": "Pe28age33tv" } ], "units": [], "opaque_params": [ { "id": "color", "readonly": false, "properties": [], "value_string": "#e91e63" } ] } } ] } }
Attention!
The opaque_params parameter group is required in order to display the template in the Web Client.
{ "method": "axxonsoft.bl.config.ConfigurationService.ChangeTemplates", "data": { "created": [ { "id": "1322d30b-bdd4-4734-8a17-7e8bff92b41c", "name": "Geolocation 35-45", "unit": { "uid": "hosts/Server1/DeviceIpint.14", "type": "DeviceIpint", "properties": [ { "id": "geoLocationLatitude", "readonly": false, "value_double": 35 }, { "id": "geoLocationLongitude", "readonly": false, "value_double": 45 } ], "units": [], "opaque_params": [ { "id": "color", "readonly": false, "properties": [], "value_string": "#00bcd4" } ] } } ] } }
{ "method": "axxonsoft.bl.config.ConfigurationService.ChangeTemplates", "data": { "modified": [ { "body": { "id": "1652b728-3292-32b3-bb7f-e0adb8c9048c", "name": "Geolocation", "unit": { "uid": "hosts/Server1/DeviceIpint.22", "type": "DeviceIpint", "properties": [ { "id": "geoLocationLatitude", "readonly": false, "value_double": 38.83424 }, { "id": "geoLocationLongitude", "readonly": false, "value_double": -111.0824 } ], "units": [ { "uid": "hosts/Server1/DeviceIpint.22/VideoChannel.0", "type": "VideoChannel", "properties": [ { "id": "display_name", "readonly": false, "properties": [], "value_string": "camera1" }, { "id": "comment", "readonly": false, "properties": [], "value_string": "" }, { "id": "enabled", "readonly": false, "properties": [], "value_bool": true } ], "units": [], "opaque_params": [] } ], "opaque_params": [ { "id": "color", "readonly": false, "properties": [], "value_string": "#00bcd4" } ] } }, "etag": "1AC1B6FA562B290E0D1080A7D1DA2D3B3596EC95" } ] } }
where etag is the template label that will change after each template edit.
{ "method": "axxonsoft.bl.config.ConfigurationService.SetTemplateAssignments", "data": { "items": [ { "unit_id": "hosts/Server1/DeviceIpint.10", "template_ids": [ "834794f0-1085-4604-a985-7715d88165bc" ] } ] } }
{ "method": "axxonsoft.bl.config.ConfigurationService.BatchGetTemplates", "data": { "items": [ { "id": "e35f6a3f-ab44-4e20-a48c-e7e36f511cc1", "etag": "0501160E0A8513E1E95689A5E6E7CD488C0EE54D" } ] } }
where etag parameter is optional:
{ "method": "axxonsoft.bl.config.ConfigurationService.ChangeTemplates", "data": { "removed": [ "cd97d7cc-3573-3864-bb6f-2814b6831341", "834794f0-1085-4604-a985-7715d88165bc" ] } }