Alternative Availability timeline for device returns blocks of time-periods when machine was running, loading or having interruption (and in this case the interruption reason).

<aside> 📌 GET https://apis.globalreader.eu/api/v1/availability_timeline/2?token=YOUR_TOKEN&workstation=6a0bbd89-f8a1-4308-8658-f3e0eba39eb5&start=1639371600&end=1639382996

</aside>

Parameters

token your API token provided by Globalreader
workstation device
start_at UNIX timestamp for period start
end_at UNIX timestamp for period end. Max query period is 7 days

Success response

HTTP status code 200

[
	{
		"duration": 1740,
		"end_at": "2021-12-13T05:29:00Z",
		"interruption_comments": null,
		"interruption_group_name": null,
		"interruption_name": null,
		"interruption_type": null,
		"interruption_uid": null,
		"operator_name": "John",
		"shift_name": "1. shift",
		"shift_uid": "154ebc4b-7231-449a-87f7-7134badb3754",
		"shiftlog_uid": "d986dd2e-1a9b-4dbe-9215-18f410696f71",
		"start_at": "2021-12-13T05:00:00Z",
		"type": 1,
		"type_key": "active",
		"workstation_name": "CNC (GRP1098)",
		"workstation_uid": "6a0aad89-f8a1-4308-8658-f3e0eba39cb5",
    "order_name": "My first order",
    "order_production_code": "MFO1",
    "product_code": "l1",
    "product_name": "Lamp"
	},
	...
]

Error response example

Any HTTP status code in 400 to 500

Missing API token key

Response fields

| type | period type 0 - no shift in that period 1 - active (machine is running) 2 - loading (machine is running but under defined minimum production level) 3 - interruption has occurred | | --- | --- | | type_key | period type as keyword. Possible values: "noshift", "active", "loading" and "interruption" | | duration | period duration end - start in seconds | | start_at | period start UTC | | end_at | period end UTC | | interruption_comments | if period is interruption comments from operator about this interruption | | interruption_group_name | if period is interruption interruption group name if available | | interruption_name | if period is interruption interruption name eg Lunch | | interruption_type | if period is interruption interruption type: 0 - unplanned interruption period 1 - recurring interruption period Lunch etc 2 - planned interruption | | interruption_uid | unique GlobalReader uid for interruption | | operator_name | Working operator name in that period | | shift_name | Running shift name in that period | | shift_uid | unique GlobalReader uid for shift | | shiftlog_uid | unique GlobalReader uid for shift event | | workstation_name | requested Device or Workstation name | | workstation_uid | requested Device or Workstation uid | | product_code | Code of the product produced | | product_name | Name of the product produced | | order_name | Name of the production order | | order_production_code | Code of the production order |

Back to API Documentation