Skip to content

Get the roll recorded for a printer

GET
/api/v1/printers/{printer_id}/roll
curl --request GET \
--url https://example.com/api/v1/printers/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/roll \
--header 'X-Label-Hub-Key: <X-Label-Hub-Key>'

Returns the roll identity last seen by the status probe, the tape colour the operator gave it and whether the operator is still to be asked. All fields are empty until the first probe. Answers 404 for an unknown printer.

printer_id
required
Printer Id
string format: uuid

Successful Response

Media typeapplication/json
RollRead

The roll recorded for a printer (GET/PUT /printers/{id}/roll).

object
colour
Colour

Tape colour the operator gave this roll; None if unknown

Any of:
string
Allowed values: white yellow green blue red black clear
media_raw
Media Raw

The media name text of the roll as the printer reported it

Any of:
string
prompt_pending
Prompt Pending

True while the operator is still to be asked for the colour

boolean
set_at
Set At

When the colour was recorded

Any of:
string
width_mm
Width Mm

Width of the roll last seen, in mm

Any of:
integer

Example

{
"colour": "white",
"prompt_pending": false
}

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"
}
]
}