system.mes.meter.getMeterConfigurationReferences
Description
By ID:
Retrieves a list of entities that reference a Meter Configuration record by its ID, preventing its deletion.
By Equipment and Name:
Retrieves a list of entities that reference a Meter Configuration record by the equipment ID and the configuration name.
Permissions
This method requires the METERING.READ.GET permission.
Syntax
system.mes.meter.getMeterConfigurationReferences(id)
system.mes.meter.getMeterConfigurationReferences(equipmentId, name)
Parameters
By ID:
| Parameter | Type | Nullable | Description |
|---|---|---|---|
id | String (ULID) | False | The ID of the Meter Configuration to check references for. |
By Equipment and Name:
| Parameter | Type | Nullable | Description |
|---|---|---|---|
equipmentId | String (ULID) | False | The ID of the equipment. |
name | String | False | The name of the Meter Configuration. |
Returns
Returns a JSON object of referencing entities grouped by entity type.
Code Examples
# Get references by ID
references = system.mes.meter.getMeterConfigurationReferences('01J9YP3JBR-WQ8GWRR2-8Y879V2F')
print(references)
# Get references by equipment ID and name
references = system.mes.meter.getMeterConfigurationReferences('01J9YP3JBR-WQ8GWRR2-8Y879V2D', 'Main Panel kWh')
print(references)