system.mes.oee.deleteCalculationConfigByLocationAndPeriod
Description
Deletes the OEE Calculation Configuration for the given location and period type.
Permissions
This method requires the OEE.WRITE.DELETE permission.
Syntax
system.mes.oee.deleteCalculationConfigByLocationAndPeriod(locationIdOrPath, periodType)
Parameters
| Parameter | Type | Nullable | Description |
|---|---|---|---|
locationIdOrPath | String | False | Location ID (ULID) or path. |
periodType | String | False | Period granularity: "HOUR", "DAY", "WEEK", "MONTH", or "SHIFT". |
Returns
A JSON ApiResponse object indicating success or failure.
| Name | Type | Description |
|---|---|---|
success | Boolean | True if the configuration was deleted successfully. |
message | String | A message describing the result. |
error | String | Error details if the operation failed, otherwise null. |
Code Examples
# Delete the daily calculation config for a line
result = system.mes.oee.deleteCalculationConfigByLocationAndPeriod("Enterprise/Site/Line1", "DAY")
if result['success']:
print "Config deleted successfully"
else:
print "Error:", result['error']