Skip to main content

Counters and history

Get print counters​

Returns the trigger and printed-label counters for a printer.

Request​

GET http://printer/api/v3/printers/{name}/printCounters

On a single-printer system the printer name can be omitted:

GET http://printer/api/v3/printCounters

Path Parameters​

NameTypeDescription
nameStringPrinter name

Response​

See getPrintCounters.

{
"triggers": 1234,
"triggerBounces": 5,
"printedLabels": 1200
}

Get print history​

Returns the number of labels printed over time, grouped into buckets of the requested resolution.

Request​

GET http://printer/api/v3/printers/{name}/printHistory?resolution=DAYS

On a single-printer system the printer name can be omitted:

GET http://printer/api/v3/printHistory?resolution=DAYS

Path Parameters​

NameTypeDescription
nameStringPrinter name

Query Parameters​

NameTypeDescription
resolutionStringBucket size: HOURS, DAYS (default), WEEKS, MONTHS v6.0, or YEARS v6.0. MINUTES is no longer supported since v6.0.
startNumberOptional. Start of the range, in seconds since the Unix epoch.
endNumberOptional. End of the range, in seconds since the Unix epoch.

Response​

See getPrintHistory. The time and count arrays are parallel: count[i] labels were printed during the bucket starting at time[i], and total v6.0 is the total number of labels printed up to the end of the range.

{
"time": [1718668800, 1718755200, 1718841600],
"count": [120, 95, 138],
"total": 48210
}