{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/canonical/main/json-schema/canonical-app-action-start-schema.json",
  "title": "AppActionStart",
  "description": "Starts one or more services.",
  "x-generated": "2026-10-04",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/canonical-apps-api-openapi.yml#/components/schemas/AppActionStart",
  "type": "object",
  "allOf": [
    {
      "$ref": "#/$defs/AppActionBase"
    },
    {
      "type": "object",
      "required": [
        "action"
      ],
      "properties": {
        "action": {
          "type": "string",
          "enum": [
            "start"
          ]
        },
        "enable": {
          "type": "boolean",
          "description": "Arranges to have the service start at system boot.",
          "default": false
        }
      }
    }
  ],
  "$defs": {
    "AppActionBase": {
      "type": "object",
      "required": [
        "action",
        "names"
      ],
      "properties": {
        "action": {
          "type": "string",
          "description": "The action to perform."
        },
        "names": {
          "type": "array",
          "description": "A list of names of snaps (e.g. \"lxd\") or specific apps (e.g. \"lxd.daemon\") to operate on.",
          "items": {
            "type": "string"
          }
        },
        "scope": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "users": {
          "type": "object",
          "properties": {
            "names": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "selector": {
              "type": "string",
              "description": "Internally converted to an integer by the servers marshalling/unmarshalling process",
              "enum": [
                "userX",
                "self",
                "all"
              ]
            }
          }
        }
      }
    }
  }
}