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.
'deleteAllModes'
Deletes multiple OEE Modes by their IDs. This cannot delete modes with references to them. If successful, an ApiResponse Object is returned with the success bool set True and a list of deleted mode IDs.
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.
Downtime Reason Functions
newDowntimeReason
Generates an empty non-persisted Downtime 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 saveDowntimeReason method in order to persist the record. Returns a JSON representation of the newly created downtime reason object.
getDowntimeReason
Retrieves a Downtime Reason record by its ID. Returns a JSON representation of the downtime reason.
getAllDowntimeReasonCodesByLocation
Retrieves all Downtime Reason records for a specific location. Returns a list of JSON objects representing all downtime reasons for the given location.
getAllDowntimeReasonCodesByLocationHierarchical
Retrieves all Downtime Reason records for a specific location in hierarchical format. Returns a hierarchical list of JSON objects representing all downtime reasons for the given location.
getAllDowntimeReasonPathsByLocation
Retrieves all downtime reason paths for a specific location. Returns a list of strings representing the paths.
saveDowntimeReason
Creates or updates a Downtime Reason record in the system based on the provided parameters. Returns a JSON representation of the saved downtime reason.
validateDowntimeReason
Validates the specified parameters for a Downtime Reason record and returns any validation errors. Returns a JSON object where keys are field names and values are lists of validation violation messages.
deleteDowntimeReason
Deletes a Downtime Reason record by its ID. This cannot delete a downtime 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
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.
getStateRecordsForPeriod
Retrieves every raw OEE state record overlapping a time period across one or more locations (wildcard path), with no micro-stop consolidation or trimming. Powers the Status Chart report. Returns a list of JSON representations of OEE State Record objects.
setDowntimeReasonForStateRecord
Sets a downtime 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.
setDowntimeReasonForStateRecord
Sets a downtime 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.
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.
scheduleOeeRecordPruning
Schedules OEE records for pruning. Records have their toBePruned flag set to true and are permanently deleted during the next nightly maintenance window. Returns the total number of records scheduled.
unscheduleOeeRecordPruning
Cancels all scheduled OEE record pruning by clearing the toBePruned flag on all OEE records.
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.
setOeeModeRecordNotesAndSpares
Sets comment fields (notes, spare1, spare2, spare3) for an OEE Mode Record. Returns a JSON representation of the edited OEE Mode Record
OEE Calculation Configuration Functions
newCalculationConfig
Creates a new, non-persisted OEE Calculation Configuration object populated with default values.
Returns a JSON representation of an OeeCalculationConfigurationDTO.
getCalculationConfig
Retrieves an OEE Calculation Configuration by its ID. Throws ResourceNotFoundException if none
exists. Returns a JSON representation of an OeeCalculationConfigurationDTO.
getCalculationConfigByLocationAndPeriod
Returns the OEE Calculation Configuration for the given location and period type. Throws
ResourceNotFoundException if none exists. Returns a JSON representation of the
OeeCalculationConfigurationDTO.
getCalculationConfigs
Returns all OEE Calculation Configurations for the given location. Returns a JSON list of
OeeCalculationConfigurationDTO objects.
saveCalculationConfig
Creates or updates an OEE Calculation Configuration. Pass fields as keyword arguments. Returns a
JSON representation of the saved OeeCalculationConfigurationDTO.
validateCalculationConfig
Validates an OEE Calculation Configuration without saving it. Pass fields as keyword arguments. Returns a JSON dictionary of validation violations keyed by field name (empty if valid).
deleteCalculationConfig
Deletes an OEE Calculation Configuration by its ID. Returns a JSON ApiResponse indicating success
or failure.
deleteAllCalculationConfigs
Deletes multiple OEE Calculation Configurations by their IDs. Returns a JSON ApiResponse
indicating success or failure.
deleteCalculationConfigByLocationAndPeriod
Deletes the OEE Calculation Configuration for the given location and period type. Returns a JSON
ApiResponse indicating success or failure.
deleteAllCalculationConfigsByLocation
Deletes all OEE Calculation Configurations for the given location. Returns a JSON ApiResponse
indicating success or failure.
OEE Calculation Record Functions
getCalculationRecord
Retrieves an OEE Calculation Record by its ID. Returns None if not found. Returns a JSON
representation of an OeeCalculationRecordDTO.
getCalculationRecords
Returns pre-computed OEE calculation records for the given location, period type, and date range,
ordered by startDate ascending. Returns a JSON list of OeeCalculationRecordDTO objects.
getCalculationRecordByLocationAndPeriodStart
Returns the single pre-computed OEE record matching the exact period start time. Returns None if
not found. Returns a JSON representation of an OeeCalculationRecordDTO.
rebuildCalculationRecords
Deletes existing pre-computed records in the specified range and regenerates them from raw data.
Returns a JSON ApiResponse indicating success or failure.
calculateOeeByCalendarPeriod
Returns one OeeResultsDTO per calendar-aligned bucket for the given location, period type, and
date range. Uses pre-computed records where available and falls back to raw calculation for missing
buckets. Returns a JSON list of OeeResultsDTO objects.
calculateOeeByShift
Returns one OeeShiftResultsDTO per shift instance in the date range for the given location. Each
result pairs a ShiftRecordDTO with an OeeResultsDTO. Returns a JSON list of
OeeShiftResultsDTO objects sorted by shift start date ascending.
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 downtime reasons ranked by the number of occurrences for a specified location and time range. Returns a list of JSON objects downtime 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 formatimportDowntimeReasonsFromCsv- Imports downtime reasons from CSV formatimportDowntimeReasonsFromJson- Imports downtime reasons from JSON formatimportOeeAlarmsFromCsv- Imports OEE alarms from CSV formatimportOeeAlarmsFromJson- Imports OEE alarms from JSON formatimportCalculationConfigurationsFromCsv- Imports OEE Calculation Configurations from CSV formatimportCalculationConfigurationsFromJson- Imports OEE Calculation Configurations 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 formatexportDowntimeReasonsAsJson- Exports downtime reasons to JSON formatexportDowntimeReasonsAsCsv- Exports downtime reasons to CSV formatexportOeeAlarmsToJson- Exports OEE alarms to JSON formatexportOeeAlarmsToCSV- Exports OEE alarms to CSV formatexportCalculationConfigurationsToJson- Exports OEE Calculation Configurations to JSON formatexportCalculationConfigurationsToCsv- Exports OEE Calculation Configurations 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 queuegetDowntimeReasonImportQueueSize- Returns the current size of the downtime reason import queuegetOeeAlarmImportQueueSize- Returns the current size of the OEE alarm queuegetCalculationConfigImportQueueSize- Returns the current size of the OEE Calculation Configuration import 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.cancelDowntimeReasonImportQueue- Cancels the current downtime reason import queue. Returns the number of canceled items.cancelOeeAlarmImportQueue- Cancels the current OEE alarm import queue. Returns the number of canceled items.cancelCalculationConfigImportQueue- Cancels the current OEE Calculation Configuration import queue. Returns the number of canceled items.
Explore each function's documentation for detailed usage examples and additional information.