Skip to main content

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

KeyTypeDescription
printerstringPrinter ID. Required if more than one printer is available.
resolutionstringBucket size: MINUTES, HOURS, DAYS, or WEEKS.
startnumberOptional. Start of the range, in seconds since the Unix epoch.
endnumberOptional. 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].

KeyTypeDescription
timearray of numberBucket start times, in seconds since the Unix epoch.
countarray of numberNumber of labels printed during each bucket.

Example

getPrintHistory {"printer": "printer1", "resolution": "DAYS"}