getPrintHistory v5.0.2
Get the print history (number of labels printed over time) for a printer.
The history is returned as buckets of the requested resolution. Each bucket reports how many labels were printed during the period that starts at its timestamp.
Parameter
| Key | Type | Description |
|---|---|---|
| printer | string | Printer ID. Required if more than one printer is available. |
| resolution | string | Bucket size: MINUTES, HOURS, DAYS, or WEEKS. |
| start | number | Optional. Start of the range, in seconds since the Unix epoch. |
| end | number | Optional. End of the range, in seconds since the Unix epoch. |
Return value
Two parallel arrays of equal length. For each index i, count[i] is the
number of labels printed during the bucket that starts at time[i].
| Key | Type | Description |
|---|---|---|
| time | array of number | Bucket start times, in seconds since the Unix epoch. |
| count | array of number | Number of labels printed during each bucket. |
Example
getPrintHistory {"printer": "printer1", "resolution": "DAYS"}