Skip to main content

system.mes.oee.getQualityReason

Description

Retrieves an OEE Quality Reason by its unique identifier.

Permissions

This method requires the OEE.READ.GET permission.

Syntax

system.mes.oee.getQualityReason(id)

Parameters

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

Returns

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

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

Code Examples

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

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