system.mes.dashboard.exportParameterTypesAsJson
Description
Exports all or selected widget parameter types as raw bytes in JSON format (UTF-8 encoded).
When idsOrNames is omitted, all parameter types are exported.
Permissions
This method requires the DASHBOARD.READ.GET permission.
Syntax
system.mes.dashboard.exportParameterTypesAsJson()
system.mes.dashboard.exportParameterTypesAsJson(idsOrNames=["Temperature"])
Parameters
| Parameter | Type | Nullable | Description |
|---|---|---|---|
idsOrNames | String[] | Yes | The ids or names of the parameter types to export. Omit to export all. |
Returns
A byte array (byte[]) containing the raw JSON bytes of the exported parameter types (UTF-8 encoded).
Code Examples
Perspective
jsonBytes = system.mes.dashboard.exportParameterTypesAsJson()
system.perspective.download("parameter-types.json", jsonBytes)
Script Console
jsonBytes = system.mes.dashboard.exportParameterTypesAsJson()
path = system.file.saveFile("parameter-types.json")
if path is not None:
system.file.writeFile(path, jsonBytes)