Examples - reporting API
- Piotr Wierzchowski
- Rafał Płoski (Unlicensed)
Below are sample request and responses to LogiX reporting API
1. Daily OEE for whole Plant
Parameters :
plant: ILA
date_from: 2007-03-01T09:00:00.000Z
date_to: 2007-03-02T09:00:00.000Z
group_by: workday
performance_type: DesignSpeed
include_OEEs: true
GET /aggregated_metrics?plant=ILA&date_from=2007-03-01T09:00:00.000Z&date_to=2007-03-02T09:00:00.000Z&group_by=workday&performance_type=DesignSpeed&include_OEEs=true
Response:
[
{
"startTime": "2007-03-02T08:00:00",
"endTime": "2007-03-03T08:00:00",
"shiftCode": null,
"activityType": null,
"activityId": null,
"hourId": null,
"workDayId": "2007-03-03T00:00:00",
"weekId": null,
"monthId": null,
"SKU": null,
"assetTaxonomyNode": null,
"assetIdentification": null,
"eventsData": null,
"OEEs": {
"OEE": "0",
"TEEP": "0",
"OEE_A": "0",
"OEE_P": "0",
"OEE_Q": "0",
"totalScheduledTimeSeconds": 0,
"totalAvailableTimeSeconds": 0,
"utilizationLossesSeconds": 0,
"availabilityLossesSeconds": 0,
"performanceLossesSeconds": 0,
"qualityLossesSeconds": 0
},
"yieldData": null
},
{
"startTime": "2007-03-01T08:00:00",
"endTime": "2007-03-02T08:00:00",
"shiftCode": null,
"activityType": null,
"activityId": null,
"hourId": null,
"workDayId": "2007-03-02T00:00:00",
"weekId": null,
"monthId": null,
"SKU": null,
"assetTaxonomyNode": null,
"assetIdentification": null,
"eventsData": null,
"OEEs": {
"OEE": "0",
"TEEP": "0",
"OEE_A": "0",
"OEE_P": "0",
"OEE_Q": "0",
"totalScheduledTimeSeconds": 0,
"totalAvailableTimeSeconds": 0,
"utilizationLossesSeconds": 0,
"availabilityLossesSeconds": 0,
"performanceLossesSeconds": 0,
"qualityLossesSeconds": 0
},
"yieldData": null
}
]
2. Daily OEE detailed for all Lines
Distinction between Plants, Areas, Lines and Machines is a part of ISA95 taxonomy. In API calls, while referring to assetes this taxonomy is default one. To get aggregates for Lines you need just to specify asset_taxonomy_levels_to_include='line'.
Parameters:
plant: ILA
date_from: 2007-03-01T09:00:00.000Z
date_to: 2007-03-02T09:00:00.000Z
asset_taxonomy_levels_to_include: line
group_by: workday
group_by: AssetTaxonomy
performance_type: DesignSpeed
include_OEEs: true
GET /aggregated_metrics?plant=ILA&date_from=2007-03-01T09:00:00.000Z&date_to=2007-03-02T09:00:00.000Z&asset_taxonomy_levels_to_include=line&group_by=workday&group_by=AssetTaxonomy&performance_type=DesignSpeed&include_OEEs=true
[
{
"startTime": "2007-03-01T08:00:00",
"endTime": "2007-03-02T08:00:00",
"shiftCode": null,
"activityType": null,
"activityId": null,
"hourId": null,
"workDayId": "2007-03-02T00:00:00",
"weekId": null,
"monthId": null,
"SKU": null,
"assetTaxonomyNode": "ILA/Area2/Line7",
"assetIdentification": null,
"eventsData": null,
"OEEs": {
"OEE": "0",
"TEEP": "0",
"OEE_A": "0",
"OEE_P": "0",
"OEE_Q": "0",
"totalScheduledTimeSeconds": 0,
"totalAvailableTimeSeconds": 0,
"utilizationLossesSeconds": 0,
"availabilityLossesSeconds": 0,
"performanceLossesSeconds": 0,
"qualityLossesSeconds": 0
},
"yieldData": null
},
{
"startTime": "2007-03-01T08:00:00",
"endTime": "2007-03-02T08:00:00",
"shiftCode": null,
"activityType": null,
"activityId": null,
"hourId": null,
"workDayId": "2007-03-02T00:00:00",
"weekId": null,
"monthId": null,
"SKU": null,
"assetTaxonomyNode": "ILA/Area2/Line6",
"assetIdentification": null,
"eventsData": null,
"OEEs": {
"OEE": "0",
"TEEP": "0",
"OEE_A": "0",
"OEE_P": "0",
"OEE_Q": "0",
"totalScheduledTimeSeconds": 0,
"totalAvailableTimeSeconds": 0,
"utilizationLossesSeconds": 0,
"availabilityLossesSeconds": 0,
"performanceLossesSeconds": 0,
"qualityLossesSeconds": 0
},
"yieldData": null
},
{
"startTime": "2007-03-02T08:00:00",
"endTime": "2007-03-03T08:00:00",
"shiftCode": null,
"activityType": null,
"activityId": null,
"hourId": null,
"workDayId": "2007-03-03T00:00:00",
"weekId": null,
"monthId": null,
"SKU": null,
"assetTaxonomyNode": "ILA/OBS/L2",
"assetIdentification": null,
"eventsData": null,
"OEEs": {
"OEE": "0",
"TEEP": "0",
"OEE_A": "0",
"OEE_P": "0",
"OEE_Q": "0",
"totalScheduledTimeSeconds": 0,
"totalAvailableTimeSeconds": 0,
"utilizationLossesSeconds": 0,
"availabilityLossesSeconds": 0,
"performanceLossesSeconds": 0,
"qualityLossesSeconds": 0
},
"yieldData": null
},
{
"startTime": "2007-03-01T08:00:00",
"endTime": "2007-03-02T08:00:00",
"shiftCode": null,
"activityType": null,
"activityId": null,
"hourId": null,
"workDayId": "2007-03-02T00:00:00",
"weekId": null,
"monthId": null,
"SKU": null,
"assetTaxonomyNode": "ILA/OBS/L4",
"assetIdentification": null,
"eventsData": null,
"OEEs": {
"OEE": "0",
"TEEP": "0",
"OEE_A": "0",
"OEE_P": "0",
"OEE_Q": "0",
"totalScheduledTimeSeconds": 0,
"totalAvailableTimeSeconds": 0,
"utilizationLossesSeconds": 0,
"availabilityLossesSeconds": 0,
"performanceLossesSeconds": 0,
"qualityLossesSeconds": 0
},
"yieldData": null
},
{
"startTime": "2007-03-01T08:00:00",
"endTime": "2007-03-02T08:00:00",
"shiftCode": null,
"activityType": null,
"activityId": null,
"hourId": null,
"workDayId": "2007-03-02T00:00:00",
"weekId": null,
"monthId": null,
"SKU": null,
"assetTaxonomyNode": "ILA/TA/L3",
"assetIdentification": null,
"eventsData": null,
"OEEs": {
"OEE": "0",
"TEEP": "0",
"OEE_A": "0",
"OEE_P": "0",
"OEE_Q": "0",
"totalScheduledTimeSeconds": 0,
"totalAvailableTimeSeconds": 0,
"utilizationLossesSeconds": 0,
"availabilityLossesSeconds": 0,
"performanceLossesSeconds": 0,
"qualityLossesSeconds": 0
},
"yieldData": null
},
{
"startTime": "2007-03-01T08:00:00",
"endTime": "2007-03-02T08:00:00",
"shiftCode": null,
"activityType": null,
"activityId": null,
"hourId": null,
"workDayId": "2007-03-02T00:00:00",
"weekId": null,
"monthId": null,
"SKU": null,
"assetTaxonomyNode": "ILA/OBS/L1",
"assetIdentification": null,
"eventsData": null,
"OEEs": {
"OEE": "0",
"TEEP": "0",
"OEE_A": "0",
"OEE_P": "0",
"OEE_Q": "0",
"totalScheduledTimeSeconds": 0,
"totalAvailableTimeSeconds": 0,
"utilizationLossesSeconds": 0,
"availabilityLossesSeconds": 0,
"performanceLossesSeconds": 0,
"qualityLossesSeconds": 0
},
"yieldData": null
},
{
"startTime": "2007-03-02T08:00:00",
"endTime": "2007-03-03T08:00:00",
"shiftCode": null,
"activityType": null,
"activityId": null,
"hourId": null,
"workDayId": "2007-03-03T00:00:00",
"weekId": null,
"monthId": null,
"SKU": null,
"assetTaxonomyNode": "ILA/Area2/Line7",
"assetIdentification": null,
"eventsData": null,
"OEEs": {
"OEE": "0",
"TEEP": "0",
"OEE_A": "0",
"OEE_P": "0",
"OEE_Q": "0",
"totalScheduledTimeSeconds": 0,
"totalAvailableTimeSeconds": 0,
"utilizationLossesSeconds": 0,
"availabilityLossesSeconds": 0,
"performanceLossesSeconds": 0,
"qualityLossesSeconds": 0
},
"yieldData": null
},
{
"startTime": "2007-03-02T08:00:00",
"endTime": "2007-03-03T08:00:00",
"shiftCode": null,
"activityType": null,
"activityId": null,
"hourId": null,
"workDayId": "2007-03-03T00:00:00",
"weekId": null,
"monthId": null,
"SKU": null,
"assetTaxonomyNode": "ILA/Area2/Line6",
"assetIdentification": null,
"eventsData": null,
"OEEs": {
"OEE": "0",
"TEEP": "0",
"OEE_A": "0",
"OEE_P": "0",
"OEE_Q": "0",
"totalScheduledTimeSeconds": 0,
"totalAvailableTimeSeconds": 0,
"utilizationLossesSeconds": 0,
"availabilityLossesSeconds": 0,
"performanceLossesSeconds": 0,
"qualityLossesSeconds": 0
},
"yieldData": null
},
{
"startTime": "2007-03-02T08:00:00",
"endTime": "2007-03-03T08:00:00",
"shiftCode": null,
"activityType": null,
"activityId": null,
"hourId": null,
"workDayId": "2007-03-03T00:00:00",
"weekId": null,
"monthId": null,
"SKU": null,
"assetTaxonomyNode": "ILA/OBS/L4",
"assetIdentification": null,
"eventsData": null,
"OEEs": {
"OEE": "0",
"TEEP": "0",
"OEE_A": "0",
"OEE_P": "0",
"OEE_Q": "0",
"totalScheduledTimeSeconds": 0,
"totalAvailableTimeSeconds": 0,
"utilizationLossesSeconds": 0,
"availabilityLossesSeconds": 0,
"performanceLossesSeconds": 0,
"qualityLossesSeconds": 0
},
"yieldData": null
},
{
"startTime": "2007-03-01T08:00:00",
"endTime": "2007-03-02T08:00:00",
"shiftCode": null,
"activityType": null,
"activityId": null,
"hourId": null,
"workDayId": "2007-03-02T00:00:00",
"weekId": null,
"monthId": null,
"SKU": null,
"assetTaxonomyNode": "ILA/OBS/L2",
"assetIdentification": null,
"eventsData": null,
"OEEs": {
"OEE": "0",
"TEEP": "0",
"OEE_A": "0",
"OEE_P": "0",
"OEE_Q": "0",
"totalScheduledTimeSeconds": 0,
"totalAvailableTimeSeconds": 0,
"utilizationLossesSeconds": 0,
"availabilityLossesSeconds": 0,
"performanceLossesSeconds": 0,
"qualityLossesSeconds": 0
},
"yieldData": null
},
{
"startTime": "2007-03-02T08:00:00",
"endTime": "2007-03-03T08:00:00",
"shiftCode": null,
"activityType": null,
"activityId": null,
"hourId": null,
"workDayId": "2007-03-03T00:00:00",
"weekId": null,
"monthId": null,
"SKU": null,
"assetTaxonomyNode": "ILA/TA/L3",
"assetIdentification": null,
"eventsData": null,
"OEEs": {
"OEE": "0",
"TEEP": "0",
"OEE_A": "0",
"OEE_P": "0",
"OEE_Q": "0",
"totalScheduledTimeSeconds": 0,
"totalAvailableTimeSeconds": 0,
"utilizationLossesSeconds": 0,
"availabilityLossesSeconds": 0,
"performanceLossesSeconds": 0,
"qualityLossesSeconds": 0
},
"yieldData": null
},
{
"startTime": "2007-03-02T08:00:00",
"endTime": "2007-03-03T08:00:00",
"shiftCode": null,
"activityType": null,
"activityId": null,
"hourId": null,
"workDayId": "2007-03-03T00:00:00",
"weekId": null,
"monthId": null,
"SKU": null,
"assetTaxonomyNode": "ILA/OBS/L1",
"assetIdentification": null,
"eventsData": null,
"OEEs": {
"OEE": "0",
"TEEP": "0",
"OEE_A": "0",
"OEE_P": "0",
"OEE_Q": "0",
"totalScheduledTimeSeconds": 0,
"totalAvailableTimeSeconds": 0,
"utilizationLossesSeconds": 0,
"availabilityLossesSeconds": 0,
"performanceLossesSeconds": 0,
"qualityLossesSeconds": 0
},
"yieldData": null
}
]
3. Summary of ‘Problems' (events from PackOS 'problems’ dictionary for Lines and Machines) registered between dates on given line
plant: ILA
date_from: 2022-11-01T09:00:00.000Z
date_to: 2022-11-03T09:00:00.000Z
asset_taxonomy_node: ILA/OBS/L1
group_by: DetailedEvent
GET /aggregated_metrics?plant=ILA&date_from=2022-11-01T09:00:00.000Z&date_to=2022-11-03T09:00:00.000Z&group_by=DetailedEvent&performance_type=DesignSpeed
[
{
"startTime": "2022-11-18T02:00:00",
"endTime": "2022-11-19T00:00:00",
"shiftCode": null,
"activityType": null,
"activityId": null,
"hourId": null,
"workDayId": null,
"weekId": null,
"monthId": null,
"SKU": null,
"assetTaxonomyNode": null,
"assetIdentification": null,
"eventsData": {
"stateName": null,
"eventRootAsset": null,
"eventDetailedName": "work",
"eventTaxonomyNode": null,
"totalTimeSeconds": 13013,
"totalOccurrencesCount": 2
},
"OEEs": null,
"yieldData": null
},
{
"startTime": "2022-11-18T02:00:00",
"endTime": "2022-11-19T00:00:00",
"shiftCode": null,
"activityType": null,
"activityId": null,
"hourId": null,
"workDayId": null,
"weekId": null,
"monthId": null,
"SKU": null,
"assetTaxonomyNode": null,
"assetIdentification": null,
"eventsData": {
"stateName": null,
"eventRootAsset": null,
"eventDetailedName": "Unrecognized breakdown",
"eventTaxonomyNode": null,
"totalTimeSeconds": 117014,
"totalOccurrencesCount": 2
},
"OEEs": null,
"yieldData": null
},
{
"startTime": "2022-11-18T02:00:00",
"endTime": "2022-11-19T00:00:00",
"shiftCode": null,
"activityType": null,
"activityId": null,
"hourId": null,
"workDayId": null,
"weekId": null,
"monthId": null,
"SKU": null,
"assetTaxonomyNode": null,
"assetIdentification": null,
"eventsData": {
"stateName": null,
"eventRootAsset": null,
"eventDetailedName": "Disconnected",
"eventTaxonomyNode": null,
"totalTimeSeconds": 79200,
"totalOccurrencesCount": 1
},
"OEEs": null,
"yieldData": null
},
{
"startTime": "2022-11-18T02:00:00",
"endTime": "2022-11-19T00:00:00",
"shiftCode": null,
"activityType": null,
"activityId": null,
"hourId": null,
"workDayId": null,
"weekId": null,
"monthId": null,
"SKU": null,
"assetTaxonomyNode": null,
"assetIdentification": null,
"eventsData": {
"stateName": null,
"eventRootAsset": null,
"eventDetailedName": "Inactive NoPlan",
"eventTaxonomyNode": null,
"totalTimeSeconds": 24993,
"totalOccurrencesCount": 1
},
"OEEs": null,
"yieldData": null
},
{
"startTime": "2022-11-18T02:00:00",
"endTime": "2022-11-19T00:00:00",
"shiftCode": null,
"activityType": null,
"activityId": null,
"hourId": null,
"workDayId": null,
"weekId": null,
"monthId": null,
"SKU": null,
"assetTaxonomyNode": null,
"assetIdentification": null,
"eventsData": {
"stateName": null,
"eventRootAsset": null,
"eventDetailedName": " Changeover started",
"eventTaxonomyNode": null,
"totalTimeSeconds": 3299,
"totalOccurrencesCount": 1
},
"OEEs": null,
"yieldData": null
}
]