Registers a connection, or sends its heartbeat.
Agents call this when they start and every 5 minutes. instanceId is the agent's own stable id for one printer (a UUID it stores locally), so a bridge watching three printers registers three connections. Each call replaces kind, displayName, agentVersion and printerId: send the printer the user chose at pairing every time, because leaving it out unbinds the connection. The response's latestAgentVersion and updateAvailable tell the agent when a newer release of it is out, so it never has to ask anyone else.
An agent can also report its health with each heartbeat (printlog-bridge#37): mode, klipperVersion, moonrakerVersion, printerModel, outboxDepth, outboxOldestAgeSeconds, lastError (scrubbed of host names, IP addresses, file names and keys by the agent), lastErrorAt, errorCount (since its previous heartbeat), snapshots and slicerSettings. All are optional and replaced on every call; a value too long is cut and a negative number counts as 0, so health never fails the heartbeat.
Request
- Base URL: https://api.3dprintlog.com
- URL: https://api.3dprintlog.com/api/Connections/{instanceId}
- Auth: one of:
- OAuth 2 (authorization code, authorization URL https://3dprintlog.auth0.com/authorize, token URL https://3dprintlog.auth0.com/oauth/token)
- API key in header X-Api-Key
- API key in query parameter api_key
Path parameters
The agent's own stable id for the printer, at most 100 characters.
Request body
Response
The connection existed and was refreshed.
Changes
No recorded changes to this operation across all 1 revision of this API.