u
This commit is contained in:
39
docs/api/routes/printer/state.md
Normal file
39
docs/api/routes/printer/state.md
Normal file
@@ -0,0 +1,39 @@
|
||||
# `GET /printer/state`
|
||||
|
||||
Protected. Requires a valid session cookie (`credentials: 'include'`).
|
||||
|
||||
Get live printer states
|
||||
|
||||
Retrieves real-time operational status and telemetry for all discovered printers
|
||||
reported by active printer agents for the authenticated user's selected company.
|
||||
|
||||
|
||||
## Query parameters
|
||||
|
||||
| Param | Required | Type | Description |
|
||||
|-------|----------|------|-------------|
|
||||
| `serial` | no | string | Optional serial number filter |
|
||||
| `agentId` | no | integer | Optional agent ID filter |
|
||||
|
||||
## Response `200`
|
||||
|
||||
Live printer states
|
||||
|
||||
```json
|
||||
{
|
||||
"printers": [
|
||||
{}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
## Errors
|
||||
|
||||
| Status | Description |
|
||||
|--------|-------------|
|
||||
| 400 | No company selected — `{"error":"…"}` |
|
||||
| 401 | Unauthorized — `{"error":"…"}` |
|
||||
|
||||
---
|
||||
|
||||
_Generated from `@openapi` JSDoc. Do not edit by hand — run `npm run docs:api`._
|
||||
Reference in New Issue
Block a user