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
| Name | Type | Description |
|---|---|---|
| name | String | Printer 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
| Name | Type | Description |
|---|---|---|
| name | String | Printer name |
Query Parameters
| Name | Type | Description |
|---|---|---|
| resolution | String | Bucket size: HOURS, DAYS (default), WEEKS, MONTHS v6.0, or YEARS v6.0. MINUTES is no longer supported since v6.0. |
| 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. |
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
}