Skip to main content

system.mes.oee.getAllAvailabilityReasonCodesByLocation

Description

Retrieves all OEE Availability 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.getAllAvailabilityReasonCodesByLocation(locationIdOrPath)

Parameters

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

Returns

A list of JSON objects representing OeeAvailabilityReasonDTO objects.

Each object has the following properties:

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

Code Examples

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

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