system.mes.meter.deleteMeterTypes
Description
Deletes multiple Meter Type records by the given IDs or names. This cannot delete any Meter Types that are referenced by Meter Configurations.
Permissions
This method requires the METERING.WRITE.DELETE permission.
Syntax
system.mes.meter.deleteMeterTypes(idsOrNames)
Parameters
| Parameter | Type | Nullable | Description |
|---|---|---|---|
idsOrNames | List<String> | False | List of IDs or names of Meter Types to delete. |
Returns
If successful, an ApiResponse object is returned with the success bool set to True. If any Meter Types have references that prevent deletion, an ApiResponse object is returned with details about the constraint violations.
| 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 multiple Meter Types by name
response = system.mes.meter.deleteMeterTypes(['Electricity', 'Water', 'Gas'])
# Output the response
print(response)