Skip to main content

system.mes.oee.getAllQualityReasonCodesByLocation

Description

Retrieves all OEE Quality Reasons configured for a specific location as a flat list, regardless of their hierarchical structure.

Permissions

This method requires OEE.READ.GET permission.

Syntax

system.mes.oee.getAllQualityReasonCodesByLocation(locationIdOrPath)

Parameters

ParameterTypeNullableDescription
locationIdOrPathStringTrueThe ID or path of the location. If null, returns reasons for all locations.

Returns

A list of JSON objects representing OeeQualityReasonDTO objects.

Each object has the following properties:

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 all quality reason codes for a specific location
location = "Site/Area/Line 1"
reasons = system.mes.oee.getAllQualityReasonCodesByLocation(location)

for reason in reasons:
print "Code: %d, Name: %s, Path: %s" % (reason['code'], reason['name'], reason['path'])