octoprint-open-api/openapi/paths/connection.yaml
2020-11-04 00:02:26 +01:00

42 lines
1.1 KiB
YAML

get:
summary: Printer Connection
operationId: getConnection
tags:
- General
- System
description: >-
Retrieve the current connection settings, including information
regarding the available baudrates and serial ports and the current
connection state.
responses:
"200":
description: Connection info object
content:
application/json:
schema:
$ref: ../components/schemas/printer/ConnectionInfo.yaml
post:
summary: Change Printer Connection
operationId: setConnectionOptions
tags:
- General
- System
requestBody:
required: true
content:
application/json:
schema:
oneOf:
- $ref: ../components/schemas/ConnectCmd.yaml
- $ref: ../components/schemas/DisconnectCmd.yaml
- $ref: ../components/schemas/FakeAckCmd.yaml
discriminator:
propertyName: command
responses:
"204":
description: Printer connection settings changed
"400":
description: >-
If the selected port or baudrate for a connect command are not part of
the available options.