Skip to main content

system.mes.oee.getAvailabilityReason

Description

Retrieves an OEE Availability Reason by its unique identifier.

Permissions

This method requires the OEE.READ.GET permission.

Syntax

system.mes.oee.getAvailabilityReason(id)

Parameters

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

Returns

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

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 a specific availability reason
reasonId = "01JCH3ENEB-SV2X8B3W-NFY8WZNK"
reason = system.mes.oee.getAvailabilityReason(reasonId)

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