Get the tape loaded in a printer
const url = 'https://example.com/api/v1/printers/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/tape';const options = {method: 'GET', headers: {'X-Label-Hub-Key': '<X-Label-Hub-Key>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://example.com/api/v1/printers/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/tape \ --header 'X-Label-Hub-Key: <X-Label-Hub-Key>'Returns the width, display label and raw media text of the tape loaded in the printer, read from the status cache that the SNMP status producer writes. colour comes from the operator’s roll record and is null until one exists. Answers 404 when there is no tape to report; see the 404 response.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Responses
Section titled “Responses”Successful Response
The tape loaded in a polled tape printer (GET /printers/{id}/tape).
object
Display label from the printer model, e.g. “62mm DK”
Width of the loaded tape in mm
Example
{ "colour": "white"}No tape to report: the printer is unknown, has no cached status (no cached status for printer ...), is not polled (Not polled), its status is stale (Status older than N s, as in the status note), it is offline (printer offline: the hub cannot see a tape through a printer it cannot reach), or no tape is loaded (no tape loaded in printer ...). The body is {"detail": "<text>"}.
The error body the routes actually send: FastAPI’s {"detail": "<text>"}.
Routes raise HTTPException(status, detail="<text>"); this is the model that describes
that body in OpenAPI. It is not :class:ProblemDetail, which no route sends.
object
Human-readable explanation of the error
Example generated
{ "detail": "example"}Validation Error
object
object
object
Example generated
{ "detail": [ { "ctx": {}, "input": "example", "loc": [ "example" ], "msg": "example", "type": "example" } ]}