Skip to main content
Version: V2 (Ignition 8.1)

system.mes.operation.getOperationRecordForLocationAndDate

Description​

Retrieves a Operation Records record by the location ID or path, the start date and the end date.

Permissions​

This method requires the OPERATION.READ.GET permission.

Syntax​

system.mes.operation.getOperationRecordForLocationAndDate(locationIdOrPath, startDateMillis, endDateMillis)

Parameters​

ParameterTypeNullableDescription
locationIdOrPathStringTrueThe ID or path of the location associated with the operation record.
startDateMillisLongTrueThe start date of the operation in milliseconds since epoch.
endDateMillisLongTrueThe end date of the operation in milliseconds since epoch.

Returns​

Returns a JSON representation of the operation record. Returns nothing if no operation record is found.

Code Examples​

# Retrieve an operation record by location, start date and end date
operationRecord = system.mes.operation.getOperationRecordForLocationAndDate('01JD7M94CJ-HPEQEJ1F-QA8EQ6VE', 1704067200000, 1735708800000)

# Output the operation record
print(operationRecord)