Skip to main content

system.mes.oee.deleteAllModes

Description

Deletes multiple OEE Modes by their IDs. This operation cannot delete a mode that has references to it from other system components.

Permissions

This method requires the OEE.WRITE.DELETE permission.

Syntax

system.mes.oee.deleteAllModes(ids)

Parameters

ParameterTypeNullableDescription
idsString[] (ULIDs)FalseA list of ULIDs of the OEE modes to delete.

Returns

If successful, an ApiResponse object is returned with the success flag set to true. If any of the OEE modes being deleted have references, an ApiResponse object is returned with details about the encountered error.

NameTypeDescription
successBooleanIndicates if the delete was successful.
messageStringThe reason why the deletion was successful or unsuccessful.
dataStringThe data associated with the deletion.
errorStringThe errors associated with the deletion.

Code Examples

# Delete multiple OEE modes by ID
result = system.mes.oee.deleteAllModes([
'01JCH3ENEB-SV2X8B3W-NFY8WZNK',
'01JCH3ENEB-SV2X8B3W-NFY8WZNL'
])

if not result['success']:
print('Failed to delete modes: ' + result['message'])