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: MINUTES, HOURS, DAYS (default), 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. |
Response
See getPrintHistory. The
time and count arrays are parallel: count[i] labels were printed during
the bucket starting at time[i].
{
"time": [1718668800, 1718755200, 1718841600],
"count": [120, 95, 138]
}