# system.kanoa.event.getReliabilityData(paramsDict)

The [Loss Analysis](../../kanoa-ops-analysis/reliabilityKPI.md) screen's figures for every OEE asset under an asset path, over a date range, read in a few queries whatever the number of assets.

Every loss is in minutes, so availability, performance and quality losses can be compared and added up:
- **Planned run time** is the production runs' time less planned downtime. Losses are only counted inside the production runs.
- **Availability loss**: unplanned downtime, every stop that isn't running or planned and lasts at least `shortStopSecs`.
- **Performance loss**: minor stops (unplanned stops shorter than `shortStopSecs`) and speed loss, (standard count - actual count) x cycle time.
- **Quality loss**: waste x cycle time.

Speed loss is split across each run's performance reasons and quality loss across its scrap reasons (the waste counts' item states), in proportion; loss no reason covers is `Unassigned`. It also returns where each asset's calendar time went by mode (utilization), and how late production started in each scheduled Production block (schedule delay).

---
### Parameters
**paramsDict** `Dictionary`<br />
<table>
	<tr><th>Key</th><th>Type</th><th>Notes</th></tr>
	<tr><td> - assetPath</td><td>String</td><td>Every OEE asset at this path or under it; all of them if omitted</td></tr>
	<tr><td> - startDate</td><td>DateTime</td><td>Required</td></tr>
	<tr><td> - endDate</td><td>DateTime</td><td>Required; no later than now</td></tr>
	<tr><td> - shortStopSecs</td><td>Integer</td><td>Unplanned stops shorter than this are minor stops; 0 if omitted</td></tr>
</table>

---
### Returns
**data** `Dictionary`, or None if it failed:
- **assets**: the number of OEE assets included (0 when there are none under the path)
- **calendarMins**, **baselineMins**, **plannedDowntimeMins**, **plannedRunMins**, **actualRunMins**, **valuableMins**: the time figures, in minutes
- **availability**, **performance**, **quality**, **oee**, **utilization**, **teep**: fractions
- **lost**: minutes lost by family, `AVAILABILITY`, `PERFORMANCE` and `QUALITY`
- **buckets**: a row per loss (`UNPLANNED`, `MINOR_STOP`, `SPEED_LOSS`, `QUALITY_LOSS`) with family, label, mins, count and countLabel
- **bucketAssets**: each loss by asset (bucket, assetPath, label, mins, count)
- **bucketReasons**: each loss by asset and reason (bucket, assetPath, reason, mins, count): the stop's state for downtime, the performance or scrap reason for speed and quality loss, else `Unassigned`
- **utilizationTotal** and **utilizationAssets**: minutes by category (Production (scheduled), Production (unscheduled), Production delay, Changeover & setup, Maintenance, Cleaning, Idle, Other, No data), in total and per asset
- **schedule**: hasSchedule, blocks, onTime, late, missed, delayMins, avgDelayMins and lateAfterMins

---
### Example
```python
data = system.kanoa.event.getReliabilityData({
	'assetPath': 'Enterprise\\Site 1',
	'startDate': system.date.addDays(system.date.now(), -7),
	'endDate': system.date.now(),
	'shortStopSecs': 300})
print data['oee'], data['lost']
```
