system.kanoa.event.getAssetProductionEventsSummary
Description
Returns summarized production data filtered by the given parameters.Syntax
getProductionEvents(paramsDict)Parameters:
Dictionary
Parameter | Type | Required | Notes |
---|---|---|---|
assetId | int | ||
startDate | datetime | ||
endDate | datetime | ||
modeId | int | e.g. 2 ('production') or None for all modes | |
workOrderId | int | None for all workorders | |
strictDates | bool | If true then counts and times will be limited to the range passed in, otherwise counts and times are for the entire run that started or ended during the range |
Code Examples
# Example Usage:
startDate = system.date.parse("2024-09-01 00:00:00")
endDate= system.date.now()
data = system.kanoa.event.getAssetProductionEventsSummary({'assetId': 510, 'startDate': startDate, 'endDate': endDate, 'strictDates': True})
data = system.kanoa.utilities.convertDatasetToJSON(data)
print data
>>>