Template procedures
Цей контент ще не доступний вашою мовою.
Parameter templates
Section titled “Parameter templates”templates.parameter.list lists the parameter templates a workspace can stamp, and
templates.parameter.stamp creates a template’s branch and parameter tree on an existing endpoint
of the workspace.
The list result is { templates: [...] }. Each row has id, localized title, defaultUnitId
(or null), and origin: overvis for built-in templates, workspace for templates pushed to
the workspace. A workspace template with the same id as a built-in one replaces it in that
workspace. A workspace template can be stamped once it has been pushed; see
Author a workspace parameter template.
{ "workspaceId": "$workspaceId" }stamp takes the template id from the list and the target endpointId:
{ "workspaceId": "$workspaceId", "templateId": "$templateId", "endpointId": "$endpointId", "unitId": 1, "rootBranchName": "Boiler room meter"}unitId is 0–255; when omitted, the template’s defaultUnitId is used, and a template without one
fails with template_unit_id_required. rootBranchName is optional. parentBranchId nests the
new root under an existing branch. Several devices behind one gateway share that gateway’s
endpoint, so each stamp names the same endpointId with its own unitId.
On MC252 PIN endpoints, the unit IDs of unknown RS-485 devices come from Modbus find and class-find
(endpoint.modbusFind.*, endpoint.modbusClassFind.*). Stamping creates every parameter of the
template; parameter.deleteSelection removes parameters afterwards.
Dashboard templates
Section titled “Dashboard templates”templates.dashboard.list returns { templates: [...] } with id, localized name, English
summary, kind, icon and visibility; long descriptions are not in the list. Narrow it with
kind, parameterTemplate or query; filters combine with AND. Only public templates are
returned, such as the starter templates.
{ "workspaceId": "$workspaceId", "kind": "starter" }templates.dashboard.get takes workspaceId and templateId (a list id) and adds the localized
description, supportedLocales, parameterTemplates, pages and configSchema (the JSON
Schema of dashboard.create’s configuration). See
Create and publish dashboards.