Skip to main content

system.mes.oee.deleteAllDowntimeReasons

Description

Deletes multiple DowntimeReasons records by their IDs. This cannot delete downtimeReasons that have references to them.

Syntax

system.mes.oee.deleteAllDowntimeReasons(ids)

Parameters

ParameterTypeNullableDescription
ids'String[]' (ULIDs)FalseAn Array of Ids of the downtime reasons to delete.

Returns

If successful, an ApiResponse object is returned with the success flag set to true. If any of the downtimeReasons 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 downtimeReasons by ID
result = system.mes.oee.deleteAllDowntimeReasons([
'01JPAND53P-BZ61RZHZ-V7C6EEHG',
'01JPAND53P-BZ61RZHZ-V7C6EEH1'
])

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