{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/octoprint/json-schema/octoprint-post-api-connection-request-schema.json",
  "title": "PostApiConnectionRequest",
  "x-generated": "2026-10-28",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/_ae-authored/octoprint-openapi-generated.yml#/components/schemas/PostApiConnectionRequest",
  "type": "object",
  "properties": {
    "command": {
      "type": "string",
      "description": "The command to issue, either connect, disconnect or fake_ack."
    },
    "port": {
      "type": "string",
      "description": "connect command: The port to connect to. If left out either the existing portPreference will be used, or if that is not available OctoPrint will attempt auto detection. Must be part of the available ports."
    },
    "baudrate": {
      "type": "number",
      "description": "connect command: The baudrate to connect with. If left out either the existing baudratePreference will be used, or if that is not available OctoPrint will attempt autodetection. Must be part of the available baudrates."
    },
    "printerProfile": {
      "type": "string",
      "description": "connect command: The id of the printer profile to use for the connection. If left out the current default printer profile will be used. Must be part of the available printer profiles."
    },
    "save": {
      "type": "boolean",
      "description": "connect command: Whether to save the supplied connection settings as the new preference. Defaults to false if not set."
    },
    "autoconnect": {
      "type": "boolean",
      "description": "connect command: Whether to attempt to automatically connect to the printer on server startup. If not set no changes will be made to the current setting."
    }
  },
  "required": [
    "command"
  ]
}