OEE API
Welcome to the OEE API documentation. This API provides a comprehensive set of functions for managing and interacting with OEE (Overall Equipment Effectiveness) within the system. Below is a list of available functions, each with a brief description and a link to its detailed documentation.
Function List
OEE Configuration Functions
newConfig
Generates an empty non-persisted OEE Configuration object to provide the structure required by the API to save a new record into the database. This method must be combined with the saveConfig method in order to persist the record. Returns a JSON representation of the newly created OEE configuration object.
getConfig
Retrieves an OEE Configuration record by its ID. Returns a JSON representation of the OEE configuration.
getConfigForLocation
Retrieves an OEE Configuration record by its location ID or path. Returns a JSON representation of the OEE configuration.
saveConfig
Creates or updates an OEE Configuration record in the system based on the provided parameters. Returns a JSON representation of the saved OEE configuration.
validateConfig
Validates the specified parameters for an OEE Configuration record and returns any validation errors. Returns a JSON object where keys are field names and values are lists of validation violation messages.
deleteConfig
Deletes an OEE Configuration record by its ID. This cannot delete a configuration with references to it. If successful, an ApiResponse Object is returned with the success bool set True.
OEE Mode Functions
newOeeMode
Generates an empty non-persisted OEE Mode object to provide the structure required by the API to save a new record into the database. This method must be combined with the saveMode method in order to persist the record. Returns a JSON representation of the newly created OEE mode object.
getMode
Retrieves an OEE Mode record by its ID. Returns a JSON representation of the OEE mode.
getAllModesForLocation
Retrieves all OEE Mode records for a specific location. Returns a list of JSON objects representing all OEE modes for the given location.
saveMode
Creates or updates an OEE Mode record in the system based on the provided parameters. Returns a JSON representation of the saved OEE mode.
validateMode
Validates the specified parameters for an OEE Mode record and returns any validation errors. Returns a JSON object where keys are field names and values are lists of validation violation messages.
deleteMode
Deletes an OEE Mode record by its ID. This cannot delete a mode with references to it. If successful, an ApiResponse Object is returned with the success bool set True.
OEE State Functions
newOeeState
Generates an empty non-persisted OEE State object to provide the structure required by the API to save a new record into the database. This method must be combined with the saveState method in order to persist the record. Returns a JSON representation of the newly created OEE state object.
getState
Retrieves an OEE State record by its ID. Returns a JSON representation of the OEE state.
getAllStatesForLocation
Retrieves all OEE State records for a specific location. Returns a list of JSON objects representing all OEE states for the given location.
saveState
Creates or updates an OEE State record in the system based on the provided parameters. Returns a JSON representation of the saved OEE state.
validateState
Validates the specified parameters for an OEE State record and returns any validation errors. Returns a JSON object where keys are field names and values are lists of validation violation messages.
deleteState
Deletes an OEE State record by its ID. This cannot delete a state with references to it. If successful, an ApiResponse Object is returned with the success bool set True.
Availability Reason Functions
newAvailabilityReason
Generates an empty non-persisted Availability Reason object to provide the structure required by the API to save a new record into the database. This method must be combined with the saveAvailabilityReason method in order to persist the record. Returns a JSON representation of the newly created availability reason object.
getAvailabilityReason
Retrieves a Availability Reason record by its ID. Returns a JSON representation of the availability reason.
getAllAvailabilityReasonCodesByLocation
Retrieves all Availability Reason records for a specific location. Returns a list of JSON objects representing all availability reasons for the given location.
getAllAvailabilityReasonCodesByLocationHierarchical
Retrieves all Availability Reason records for a specific location in hierarchical format. Returns a hierarchical list of JSON objects representing all availability reasons for the given location.
getAllAvailabilityReasonPathsByLocation
Retrieves all availability reason paths for a specific location. Returns a list of strings representing the paths.
saveAvailabilityReason
Creates or updates a Availability Reason record in the system based on the provided parameters. Returns a JSON representation of the saved availability reason.
validateAvailabilityReason
Validates the specified parameters for a Availability Reason record and returns any validation errors. Returns a JSON object where keys are field names and values are lists of validation violation messages.
deleteAvailabilityReason
Deletes a Availability Reason record by its ID. This cannot delete a availability reason with references to it. If successful, an ApiResponse Object is returned with the success bool set True.
Oee Alarm Functions
newOeeAlarm
Creates an empty non-persisted OEE Alarm object to provide the structure required by the API to save a new alarm configuration. Returns a JSON object representing the newly created OEE Alarm object.
getOeeAlarm
Retrieves an OEE Alarm configuration by its ID. Returns a JSON representation of the OEE Alarm object.
getAllOeeAlarmsForLocation
Retrieves all OEE Alarm configurations for a specific location. Returns a list of JSON objects representing all OEE Alarm objects for the location.
saveOeeAlarm
Creates or updates an OEE Alarm configuration in the system. Returns a JSON representation of the saved OEE Alarm object.
validateOeeAlarm
Validates the specified parameters for an OEE Alarm configuration and returns any validation errors. Returns a JSON object where keys are field names and values are lists of validation violation messages.
deleteOeeAlarm
Deletes an OEE Alarm configuration by its ID. This cannot delete an alarm with references to it. If successful, an ApiResponse object is returned with the success bool set to True.
Record Functions
getOeeProductionRecord
Retrieves a specific OEE Record by its ID. Returns a JSON representation of the OEE Record object.
getAllOeeProductionRecords
Retrieves all OEE records for a specific location within a date range. Returns a list of JSON objects representing OEE records.
getOeeProductionRecordTimeline
Retrieves production timeline data for OEE records, providing a chronological view of production activities for a specific location within a time range. Returns a list of JSON representations of the OEE Record objects.
getAllOeeModeRecords
Retrieves all OEE mode records for a specific location within a date range. Returns a list of JSON objects representing OEE mode records.
getModeRecordTimeline
Retrieves mode record timeline data for a specific location within a date range. Returns a list of JSON representations of OEE Mode Record objects
getStateRecordsFiltered
Retrieves filtered OEE state records based on various criteria including event types and micro-stop thresholds. Returns a list of JSON representations of OEE State Record objects.
getOeeStateRecordDetailed
Retrieves detailed information for a specific OEE State Record by its ID, including related mode records, alarm records, and other associated data. Returns a JSON representation of an OEE State Record Detailed object.
getModeRecordsFiltered
Retrieves all OEE Mode records that match the provided filters such as location, date range, calculation types, codes, statuses, and duration/overrun duration ranges. Returns a list of JSON representations of OEE Mode Record objects.
getDetailedStateRecordsFiltered
Retrieves OEE State Records with detailed information including related mode records, alarm records, and other associated data. Returns a list of JSON objects representations of OEE State Record Detailed objects.
getDowntimeRecordsFiltered
Retrieves filtered downtime records based on various criteria. Returns a list of JSON representations of OEE State Record objects.
getStateRecordTimeline
Retrieves state record timeline data for a specific location within a date range. Returns a list of JSON representations of OEE State Record objects.
setAvailabilityReasonForStateRecord
Sets a availability reason for a specific state record, with optional notes and acknowledgment. Returns a JSON representation of the updated state record.
setPrimaryAlarmRecordForStateRecord
Manually sets the primary alarm for an OEE State Record. This allows overriding the automatic primary alarm selection based on the primary_alarm_resolution_strategy in the OEE configuration. Returns a JSON representation of the edited `State Record object.
acknowledgeStateRecord
Acknowledges a specific OEE state record, marking it as reviewed and accepted. Returns a JSON representation of the updated state record.
setAvailabilityReasonForStateRecord
Sets a availability reason for a specific state record, with optional notes and acknowledgment. Returns the updated state record.
splitDowntimeEvent
Splits an existing downtime event (an OEE state record) at a specified time. This action modifies the original record, shortening its duration, and creates a new record for the remaining time. Returns a JSON representation of the new state record.
splitOeeStateRecord
Splits an existing OEE state record at a specified time. This action modifies the original record, shortening its duration, and creates a new record for the remaining time. Returns a JSON representation of the new state record.
splitOeeProductionRecord
Splits an existing OEE record at a specified time. This action modifies the original record, shortening its duration, and creates a new record for the remaining time. Returns a JSON representation of the new record.
splitOeeModeRecord
Splits an existing OEE Mode record at a specified time. This action modifies the original record, shortening its duration, and creates a new record for the remaining time. Returns a JSON representation of the new record.
updateOeeStateRecordState
Updates the state of an existing OEE State Record. Copies the code, name, calculation type, color, from the OEE State to the OEE State Record. Returns a JSON representation of the updated record.
updateOeeModeRecordMode
Updates the state of an existing OEE Mode Record. Copies the code, name, calculation type, color, from the OEE State to the OEE State Record. Returns a JSON representation of the updated record.
getStateRecordsGroupedByState
Retrieves state records grouped by state type for a specific location and time range. Returns a list of JSON representations of OEE State Records Grouped By State objects.
getOeeStateRecord
Retrieves a specific OEE state record by its ID. Returns a JSON representation of the state record.
getOeeModeRecord
Retrieves a specific OEE mode record by its ID. Returns a JSON representation of the mode record.
getModeRecordsGroupedByMode
Retrieves mode records grouped by mode type for a specific location and time range. Returns a list of JSON representations of OEE Mode Records Grouped By Mode objects.
getAggregatedModeRecordsWithStatesBreakdown
Retrieves aggregated OEE mode records with states breakdown for a specific location and time range. Returns a list of JSON representations of OEE Chart Segment objects.
pruneOeeRecords
Prunes OEE records for a given location that are older than the prune date.
findAlarmRecordsForStateRecord
Finds alarm records associated with a specific state record. Returns a list of JSON representations of alarm records.
getOeeAlarmRecord
Retrieves an OEE Alarm Record by its ID. Returns a JSON representation of the OEE Alarm Record object.
setOeeProductionRecordNotesAndSpares
Sets comment fields (notes, spare1, spare2, spare3) for an OEE Record. Returns a JSON representation of the edited OEE Record
setOeeModeRecordNotesAndSpares
Sets comment fields (notes, spare1, spare2, spare3) for an OEE Mode Record. Returns a JSON representation of the edited OEE Mode Record
Calculation/Utility Functions
calculateOee
Calculates OEE metrics for a specific location within a date range. Returns a JSON object containing calculated OEE metrics.
calculateOeeByTimeInterval
Calculates OEE metrics broken down by time intervals for a specific location. Returns a list of JSON objects representing OEE results for each time interval.
getDowntimeStatistics
Calculates downtime statistics for a specific location within a date range. Returns a JSON object containing comprehensive downtime statistics.
getDowntimeByReason
Retrieves downtime data grouped by reason for a specific location. Returns a list of JSON objects containing downtime data categorized by reason.
getTopDowntimeByDuration
Retrieves the top downtime events by duration for a specific location. Returns a list of JSON objects representing downtime data, ordered by duration.
getTopDowntimeByCount
Retrieves the top availability reasons ranked by the number of occurrences for a specified location and time range. Returns a list of JSON objects availability reasons.
getTopInterruptionLocationsByDuration
Retrieves the top interruption locations, ranked by their total accumulated downtime duration, for a specified parent location and time range. Returns a list of JSON objects containing interruption location and other related data.
getTopInterruptionLocationsByCount
Retrieves the top interruption locations, ranked by the number of downtime occurrences, for a specified parent location and time range. Returns a list of JSON objects containing interruption location and other related data.
flushOeeDataStateToDB
Flushes the in-memory OEE data state to the database. This is a system management function that ensures data is persisted.
resetOeeDataStateFromDB
Resets the OEE data state from the database.
getOeePermissions
Retrieves a list of all available OEE permissions in the system. Returns a list of strings of permission types.
Import/Export Functions
Import Functions
importOeeConfigurationsFromCsv- Imports OEE configurations from CSV formatimportOeeConfigurationsFromJson- Imports OEE configurations from JSON formatimportOeeModesFromCsv- Imports OEE modes from CSV formatimportOeeModesFromJson- Imports OEE modes from JSON formatimportOeeStatesFromCsv- Imports OEE states from CSV formatimportOeeStatesFromJson- Imports OEE states from JSON formatimportAvailabilityReasonsFromCsv- Imports availability reasons from CSV formatimportAvailabilityReasonsFromJson- Imports availability reasons from JSON formatimportOeeAlarmsFromCsv- Imports OEE alarms from CSV formatimportOeeAlarmsFromJson- Imports OEE alarms from JSON format
Export Functions
exportOeeConfigurationsToJson- Exports OEE configurations to JSON formatexportOeeConfigurationsToCsv- Exports OEE configurations to CSV formatexportOeeModesToJson- Exports OEE modes to JSON formatexportOeeModesToCsv- Exports OEE modes to CSV formatexportOeeStatesToJson- Exports OEE states to JSON formatexportOeeStatesToCsv- Exports OEE states to CSV formatexportAvailabilityReasonsAsJson- Exports availability reasons to JSON formatexportAvailabilityReasonsAsCsv- Exports availability reasons to CSV formatexportOeeAlarmsToJson- Exports OEE alarms to JSON formatexportOeeAlarmsToCSV- Exports OEE alarms to CSV format
Queue Functions
getOeeConfigurationImportQueueSize- Returns the current size of the OEE configuration import queuegetOeeModeImportQueueSize- Returns the current size of the OEE mode import queuegetOeeStateImportQueueSize- Returns the current size of the OEE state import queuegetAvailabilityReasonImportQueueSize- Returns the current size of the availability reason import queuegetOeeAlarmImportQueueSize- Returns the current size of the OEE alarm queuecancelOeeConfigurationImportQueue- Cancels the current OEE configuration import queue. Returns the number of canceled items.cancelOeeModeImportQueue- Cancels the current OEE mode import queue. Returns the number of canceled items.cancelOeeStateImportQueue- Cancels the current OEE state import queue. Returns the number of canceled items.cancelAvailabilityReasonImportQueue- Cancels the current availability reason import queue. Returns the number of canceled items.cancelOeeAlarmImportQueue- Cancels the current OEE alarm import queue. Returns the number of canceled items.
Explore each function's documentation for detailed usage examples and additional information.