Skip to main content

system.mes.oee.getAllPerformanceReasonCodesByLocation

Description

Retrieves all OEE Performance 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.getAllPerformanceReasonCodesByLocation(locationIdOrPath)

Parameters

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

Returns

A list of JSON objects representing OeePerformanceReasonDTO objects.

Each object has the following properties:

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

Code Examples

# Get all performance reason codes for a specific location
location = "Site/Area/Line 1"
reasons = system.mes.oee.getAllPerformanceReasonCodesByLocation(location)

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