system.mes.meter.deleteMeterType
Description
Deletes a Meter Type record by its ID or name. This cannot delete a Meter Type that is referenced by a Meter Configuration.
Permissions
This method requires the METERING.WRITE.DELETE permission.
Syntax
system.mes.meter.deleteMeterType(idOrName)
Parameters
| Parameter | Type | Nullable | Description |
|---|---|---|---|
idOrName | String | False | The ID or name of the Meter Type to delete. |
Returns
If successful, an ApiResponse object is returned with the success bool set to True. If the Meter Type has 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 a Meter Type by name
response = system.mes.meter.deleteMeterType('Electricity')
# Output the response
print(response)