system.mes.meter.deleteMeterConfiguration
Description
By ID:
Deletes a Meter Configuration record by its ID.
By Equipment and Name:
Deletes a Meter Configuration record by the equipment ID and the configuration name.
Permissions
This method requires the METERING.WRITE.DELETE permission.
Syntax
This method accepts either key set: provide id, or provide both equipmentId and name.
# By ID
system.mes.meter.deleteMeterConfiguration(id=id)
# By equipment and name
system.mes.meter.deleteMeterConfiguration(equipmentId=equipmentId, name=name)
Parameters
Provide either id, or both equipmentId and name. All parameters are individually nullable because the two key sets are mutually exclusive.
| Parameter | Type | Nullable | Description |
|---|---|---|---|
id | String (ULID) | Yes | The ID of the Meter Configuration to delete. |
equipmentId | String (ULID) | Yes | The ID of the equipment. Provide together with name. |
name | String | Yes | The name of the Meter Configuration to delete. Provide together with equipmentId. |
Returns
If successful, an ApiResponse object is returned with the success bool set to True.
| Name | Type | Description |
|---|---|---|
success | Boolean | Indicates if the delete was successful. |
message | String | The reason why the deletion was successful or unsuccessful. |
data | String | The data associated with the deletion. |
error | String | The errors associated with the deletion. |
Code Examples
# Delete a Meter Configuration by ID
response = system.mes.meter.deleteMeterConfiguration(id='01J9YP3JBR-WQ8GWRR2-8Y879V2F')
print(response)
# Delete a Meter Configuration by equipment ID and name
response = system.mes.meter.deleteMeterConfiguration(equipmentId='01J9YP3JBR-WQ8GWRR2-8Y879V2D', name='Main Panel kWh')
print(response)