Skip to main content

system.mes.oee.getDowntimeReason

Description

Retrieves an OEE Downtime Reason by its unique identifier.

Permissions

This method requires the OEE.READ.GET permission.

Syntax

system.mes.oee.getDowntimeReason(id)

Parameters

ParameterTypeNullableDescription
idString (ULID)FalseThe ULID of the downtime reason to retrieve.

Returns

Returns a JSON representation of an OeeDowntimeReasonDTO object if found, or None if the downtime reason doesn't exist.

NameTypeNullableDescriptionDefault Value
idStringTrueThe id of the Downtime Reasonnull
locationIdStringTrueIdentifier of the associated location where this downtime reason appliesnull
locationPathStringTruePath of the associated location where this downtime reason appliesnull
parentIdStringTrueIdentifier of the parent downtime reason, if applicablenull
codeIntegerFalseUnique fault code associated with this downtime reason0
nameStringFalseName of the downtime reasonnull
descriptionStringTrueDescription of the downtime reasonnull
pathStringTruePath representation of the downtime reason within a hierarchical structurenull
notesStringTrueNotes associated with the Downtime Reasonnull
enabledbooleanTrueIndicates whether the Downtime Reason is enabledtrue
spare1StringTrueExtra field 1null
spare2StringTrueExtra field 2null
spare3StringTrueExtra field 3null

Code Examples

# Get a specific downtime reason
reasonId = "01JCH3ENEB-SV2X8B3W-NFY8WZNK"
reason = system.mes.oee.getDowntimeReason(reasonId)

if reason:
print reason['name'], reason['code']
else:
print "Downtime reason not found"