u
This commit is contained in:
37
docs/api/routes/printer/_id/state.md
Normal file
37
docs/api/routes/printer/_id/state.md
Normal file
@@ -0,0 +1,37 @@
|
||||
# `GET /printer/{id}/state`
|
||||
|
||||
Protected. Requires a valid session cookie (`credentials: 'include'`).
|
||||
|
||||
Get live state for a printer
|
||||
|
||||
Retrieves live operational status for a single printer by configured printer ID,
|
||||
serial number, or device identifier for the authenticated user's selected company.
|
||||
|
||||
|
||||
## Path parameters
|
||||
|
||||
| Param | Required | Type | Description |
|
||||
|-------|----------|------|-------------|
|
||||
| `id` | yes | string | Configured printer ID, serial number, or device identifier |
|
||||
|
||||
## Response `200`
|
||||
|
||||
Live printer state
|
||||
|
||||
```json
|
||||
{
|
||||
"printer": {}
|
||||
}
|
||||
```
|
||||
|
||||
## Errors
|
||||
|
||||
| Status | Description |
|
||||
|--------|-------------|
|
||||
| 400 | No company selected or invalid ID — `{"error":"…"}` |
|
||||
| 401 | Unauthorized — `{"error":"…"}` |
|
||||
| 404 | Printer not found — `{"error":"…"}` |
|
||||
|
||||
---
|
||||
|
||||
_Generated from `@openapi` JSDoc. Do not edit by hand — run `npm run docs:api`._
|
||||
Reference in New Issue
Block a user