Upgrading to 1.7.0
Labelyard 1.7.0 is a feature release. Your data, keys and settings carry over; update the tag as described in Tags and updating. Check the points below if a script or integration reads printer data or error answers from the API, creates API keys, or reads the container log.
The SNMP community is no longer returned
Section titled “The SNMP community is no longer returned”The SNMP community works like a password for the printer’s status. From 1.7.0 no printer response shows it.
GET /api/v1/printers,GET /api/v1/printers/{id}and the admin printer routes reportconnection.snmp.community_setinstead of the community:truewhen a community is stored.- To change the community, send it as before in
connection.snmp.community. Leave it out, or sendnull, to keep the stored one. A new printer without a community getspublic. - If you change the printer’s host or port, send the community again. Without it the hub answers
422withsnmp_community_requiredand saves nothing, so a stored community never goes to a new address. - The print check before each job now uses the stored community, the same one as status discovery. A printer with its own community no longer shows up as offline when you print.
If a script reads connection.snmp.community, it now finds no value. Read community_set instead.
Admin keys act on every printer
Section titled “Admin keys act on every printer”A key with the admin scope always acts on every printer. A printer list on such a key never had a use for admin routes, and it kept an admin key from printing on other printers. From 1.7.0 the hub ignores the list on an admin key.
- A key you created with the
adminscope and a printer list loses that restriction. It works on every printer, and the key list shows the stored list as ignored. To remove the stored list, send{"allowed_printer_ids": []}toPATCH /api/v1/admin/api-keys/{id}. - Creating an admin key with a printer list, or adding a printer list to an admin key, answers
422withadmin_key_not_restrictable. Nothing is saved. Leave the list out, or create aprintkey if the key must stay on some printers. readandprintkeys keep their printer list.
If you want an admin key that is limited to some printers, replace it with a print key for those printers and keep a separate admin key for yourself.
Long tape labels are refused
Section titled “Long tape labels are refused”A tape label longer than its tape allows no longer prints. That is 1000 mm on TZe tape and 500 mm on heat-shrink tube; DK rolls allow 30 m. A label that printed before 1.7.0, for example a 1.2 m label on TZe tape, is now refused with the new code tape_label_too_long (length_mm, max_mm in the detail): the printing routes answer 422 and a batch with such a label is refused as a whole; the Grocy label webhook answers 202 and its job fails (details below). Shorten the text, or print the content on two labels.
Changed error answers
Section titled “Changed error answers”The printing routes answer printer and render errors in one way. Status and code stay the same for every answer that was already a 4xx or 503; the points below change. If an API client such as Hangar reads these answers, check it against this list.
The routes use two body shapes:
- Envelope:
{"detail": {"error_code": "…", "error_message": "…", "error_detail": {…}}}, used by/print, the batch route, the render check and the webhooks. - Wrapped problem:
{"detail": {"type": "…", "title": "…", "status": …}}, used by the test print.
POST /api/v1/print, POST /api/v1/webhook/spoolman and POST /api/v1/webhook/grocy
- An SNMP query that fails answers
503with the new codesnmp_query_failedin the envelope, not500. unsupported_tape, the spool-only tape widths andcontent_type_data_mismatchanswer a fixed text and anerror_detail(tape_mm,content_types,missing_fields).printer_offlineanswers “The printer could not be reached.” and no longer names the printer’s address.
POST /api/v1/render/check and POST /api/v1/render/preview
content_type_data_mismatch,qr_payload_too_long, lookup errors and the printer errors answer in the envelope with their status and code, not500or a top-level problem.- In the render check,
unsupported_tapereads “The currently loaded tape width …”.
POST /api/v1/print/{printer_key}/batch
- An empty tape answers
409with{"detail": {"error_code": "tape_empty", …}}. It was a top-level problem with"type": "tape-empty". A client that readstypeat the top level must readdetail.error_codeinstead. - A disabled printer answers
409withprinter_disabledin the envelope, not500. - A tape that does not take the layout’s orientation answers the orientation sentence.
printer_offlineandsnmp_query_failedanswer fixed sentences.
POST /api/v1/printers/{printer_id}/test-print
- An open cover, a tape mismatch and an empty tape answer a wrapped problem under
detail, not a top-level problem. The title is a full sentence, and there is nodetailtext inside. no-tape-loadedhas the title “No tape loaded — insert a Brother TZe or DK cartridge.” and nodetailtext.- An unsupported tape answers
409unsupported-tape(extensions.tape_mm), a label that does not fit its content type422content-type-data-mismatch(extensions.missing_fields), an unknown integration422integration-unknown-appand a failed lookup502integration-lookup-failed. All four were500.
Printer state and loaded roll (every tape printing route)
- A print to a tape printer that reports a blocking error bit answers
409with the new codeprinter_errorand the reported bits in the detail (error_detail.flagsin the envelope,extensions.flagsin a problem), for examplejammedorserviceRequested. It used to be accepted and sent.noPaperstill answerstape_emptyanddoorOpenprinter_cover_open. Warning bits (lowPaper,lowToner,overduePreventMaint) do not refuse. - A QL roll the printer names as die-cut labels answers
409with the new codemedia_type_mismatch(loaded_kind,media_raw). The hub prints on continuous tape only. - Right before a QL job is sent, the hub reads the loaded roll again. A different width fails the job with
tape_mismatch, a printer without a roll withno_tape_loaded, and nothing is sent. The P-touch printers already did this. - After a tape job is sent, the hub reads the printer’s status once more. A blocking error bit the printer did not report before the job ends the job
failedwithprinter_error(an empty tape or an open cover with their own codes), and the printer pauses. Such a job used to enddone. A status that cannot be read after sending leaves the jobdone. - A tape job ends
doneonly when the printer confirmed its labels: over IPP (ipp://<printer>:631/ipp/print, the job state) when the printer takes the raster data that way, else with its label counter (SNMPprtMarkerLifeCount). The wait is 15 s plus 8 s per label plus 1 s per 20 mm of tape; a printer that still reportsprinting(or an IPP job in stateprocessing) gets up to twice that. A label longer than the tape allows (max_length_mmof the tape: 1000 mm on TZe tape, 500 mm on heat-shrink tube) is refused with the new codetape_label_too_long(length_mm,max_mmin the detail).POST /api/v1/print, the batch route,POST /api/v1/webhook/spoolman,POST /api/v1/webhook/grocyand the test print answer422and store nothing; a batch with one such label is refused as a whole. The Grocy label webhook (POST /api/v1/webhook/grocy/label) answers before the label is drawn, so it still answers202, and its job fails with the code, never printed. A retried job, a reprint and a job recovered after a restart are checked when they are sent and fail the same way. The printer does not pause for it. A shortfall ends the job, or the labels of a run the printer did not confirm,failedwith the new codelabels_not_confirmed(printed,expectedin the detail); the printer does not pause for it. An IPP job the printer neither completed in time nor let the hub cancel endsfailedwithoutcome_unknown(the labels may still print), unless the label counter rose by exactly the labels sent; the printer pauses for it, a single job as well as a run. A printer that does not list Get-Job-Attributes and Cancel-Job inoperations-supportedis sent over TCP 9100. A printer that refuses the counter (noSuchName, noSuchObject, noSuchInstance) three times in a row (within an hour, with no other answer to the counter in between; a read that fails altogether counts neither way) is no longer asked for it; it is asked again after an hour with a fresh count, and with every test print, andprint_confirmationthen showschannelnonewithcounter_readfalse. A printer that offers neither keeps the rule above. - A tape printer’s test print finds out which of the two works and stores it with the printer:
print_confirmationon the printer and its capabilities (channelipp,label_counterornone). The database gets the columnprinters.print_confirmation(migration20261118a2). Until a printer’s first test print the hub asks the printer for IPP when it first sends; a new host or port clears the stored record. Every test print tries IPP again, unless the printer took an earlier test label over IPP and did not complete it without a new blocking bit to explain it (ipp_incompletein the stored record and inprint_confirmation; the printer page names it).
Other routes
- Sheet print and preview, the calibration page, batch continue and reprint, job retry and the Grocy label webhook answer a known printer or render error with a top-level problem and its status and code, not
500. - Every route that answers
503printer-offlinethrough the global handler hasdetail“The printer could not be reached.” and no longer names the address.
The OpenAPI document lists every status and code of /print, the batch route and the webhooks, with the body shape.
Access log on stdout
Section titled “Access log on stdout”The hub writes one line per HTTP request to its container output, in nginx’s combined format. It replaces uvicorn’s own access lines: a tool that parsed those sees the new format. A key in the request shows only its public prefix, never the key.
The access log is on by default. Set LABELYARD_ACCESS_LOG=false to turn it off. Successful /healthz and /readiness calls are left out; LABELYARD_ACCESS_LOG_PROBES=true logs them too. Details, and how CrowdSec reads it: access log.
Settings in the navigation
Section titled “Settings in the navigation”Sessions without the admin scope no longer see Settings in the navigation; the settings routes were admin-only before and still are.
Sheet type files with a placement are format version 2
Section titled “Sheet type files with a placement are format version 2”A sheet type can now say where the sheet code goes and which backing design its liner carries. When you export a type with such a setting, the file says format_version: 2 and carries id_placement, id_cell or backing_design. Labelyard 1.7.0 and later import it; an older hub refuses it with its version error. A type without these settings still exports as format_version: 1 and imports on older hubs as before. That includes the shipped Avery Zweckform 3490 and 6121 while they keep the backing design Labelyard links them to; once you change their placement or design, they export as version 2.
Importing a type that already exists in the hub adds a version and keeps the hub’s own placement and backing design: a choice made on this hub wins over the file.
The sheet API also knows a new placement: id_placement of a sheet can be back_side. A script that reads it should accept the new value.