Skip to content

Drucker aktivieren

POST
/api/v1/admin/printers/{slug}/enable
curl --request POST \
--url https://example.com/api/v1/admin/printers/example/enable \
--header 'X-Label-Hub-Key: <X-Label-Hub-Key>'

Aktiviert einen deaktivierten Drucker. Gibt 404 zurück wenn kein Drucker mit diesem Slug existiert. Gibt 409 zurück wenn der Drucker bereits aktiv ist. The printer is wired again before the answer; no restart is needed.

slug
required
Slug
string

Successful Response

Media typeapplication/json
PrinterRead

Lesbare Darstellung eines Druckers.

Enthält alle DB-Felder — keine internen Implementierungsdetails. trays is the tray list of a page printer and null for tape printers.

object
backend
required
Backend
string
connection
required
Connection
object
key
additional properties
any
created_at
required
Created At
string
cut_defaults
required
Cut Defaults
object
key
additional properties
any
enabled
required
Enabled
boolean
hardware_id
Hardware Id

Serial, IPP printer-uuid or MAC the hub stored for the device; admin only

Any of:
string
hardware_id_kind
Hardware Id Kind

Serial | ipp_uuid | mac

Any of:
string
hardware_id_seen_at
Hardware Id Seen At

When a probe last saw the stored device

Any of:
string
id
required
Id
string format: uuid
layout_defaults
Layout Defaults

Stored label layout per tape width in mm (#258), keyed by the width as a string; a missing width uses the tape default (62 mm across/compact, else along)

object
key
additional properties
LayoutDefault

A stored layout default for one tape width of one printer.

None fields fall back to the built-in default for the tape (62 mm: across, compact; every other width: along).

object
orientation
Any of:
LabelOrientation

How the label content runs on endless tape.

string
Allowed values: across along
preset
Any of:
QlLayoutPreset

The built-in QL 62 mm across-width layouts (docs/design/ql-layout-presets).

string
Allowed values: compact small_qr standard
model
required
Model
string
name
required
Name
string
observed_id
Observed Id

The differing device a flagged swap is about; null otherwise

Any of:
string
observed_kind
Observed Kind

Serial | ipp_uuid | mac

Any of:
string
queue
required
Queue
object
key
additional properties
any
slug
required
Slug
string
trays
Trays
Any of:
Array<object>
TrayRead

A configured tray of a page printer.

object
enabled
required
Enabled
boolean
is_default
required
Is Default
boolean
key
required
Key
string
label
required
Label
string
load_hint
required
Load Hint
Any of:
string
updated_at
required
Updated At
string

Example

{
"layout_defaults": {
"additionalProperty": {
"orientation": "across",
"preset": "compact"
}
}
}

Validation Error

Media typeapplication/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationError
object
ctx
Context
object
input
Input
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string

Example generated

{
"detail": [
{
"ctx": {},
"input": "example",
"loc": [
"example"
],
"msg": "example",
"type": "example"
}
]
}