system.mes.meter.importMeterConfigurationsFromJson
Description
Imports Meter Configuration records from a JSON file.
Permissions
This method requires the METERING.WRITE.SAVE permission.
Syntax
system.mes.meter.importMeterConfigurationsFromJson(bytes)
Parameters
| Parameter | Type | Nullable | Description |
|---|---|---|---|
bytes | byte[] | False | The JSON file contents as bytes. |
Returns
Returns a JSON representation of the import response.
Code Examples
Script Console
# Open a file dialog and import Meter Configurations from the selected JSON file
path = system.file.openFile("json")
if path is not None:
jsonBytes = system.file.readFileAsBytes(path)
response = system.mes.meter.importMeterConfigurationsFromJson(jsonBytes)
print(response)