Skip to main content

system.mes.oee.getAllDowntimeReasonCodesByLocation

Description

Retrieves all OEE Downtime 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.getAllDowntimeReasonCodesByLocation(locationIdOrPath)

Parameters

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

Returns

A list of JSON objects representing OeeDowntimeReasonDTO objects.

Each object has the following properties:

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

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