{ "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://raw.githubusercontent.com/api-evangelist/portainer/main/json-schema/portainer-edge-stack-payload-schema.json", "title": "edge.StackPayload", "x-generated": "2026-10-03", "x-method": "derived", "x-generator": "derive-json-schema.py", "x-source": "openapi/portainer-edge-api-openapi.yml#/components/schemas/edge.StackPayload", "properties": { "AlwaysCloneGitRepoForRelativePath": { "description": "AlwaysCloneGitRepoForRelativePath is a flag indicating if the agent must always clone the git repository for relative path.\nThis field is only valid when SupportRelativePath is true.\nUsed only for EE", "type": "boolean" }, "CreatedBy": { "description": "CreatedBy is the username that created this stack\nUsed for adding labels to Kubernetes manifests", "type": "string" }, "CreatedByUserId": { "description": "CreatedByUserId is the user ID that created this stack\nUsed for adding labels to Kubernetes manifests", "type": "string" }, "DeployerOptionsPayload": { "$ref": "#/$defs/edge.DeployerOptionsPayload" }, "DirEntries": { "description": "Content of stack folder", "items": { "$ref": "#/$defs/filesystem.DirEntry" }, "type": "array" }, "EdgeUpdateID": { "description": "EdgeUpdateID is the ID of the edge update related to this stack.\nUsed only for EE", "type": "integer" }, "EntryFileName": { "description": "Name of the stack entry file", "type": "string" }, "EnvVars": { "description": "Used only for EE\nEnvVars is a list of environment variables to inject into the stack", "items": { "$ref": "#/$defs/portainer.Pair" }, "type": "array" }, "FilesystemPath": { "description": "Mount point for relative path", "type": "string" }, "ForceUpdate": { "description": "ForceUpdate is a flag indicating if the agent must force the update of the stack.\nUsed only for EE", "type": "boolean" }, "HelmConfig": { "allOf": [ { "$ref": "#/$defs/portainer.HelmConfig" } ], "description": "HelmConfig represents the Helm configuration for an edge stack" }, "ID": { "description": "ID of the stack", "type": "integer" }, "Name": { "description": "Name of the stack", "type": "string" }, "Namespace": { "description": "Namespace to use for kubernetes stack. Keep empty to use the manifest namespace.", "type": "string" }, "PrePullImage": { "description": "PrePullImage is a flag indicating if the agent must pull the image before deploying the stack.\nUsed only for EE", "type": "boolean" }, "RePullImage": { "description": "RePullImage is a flag indicating if the agent must pull the image if it is already present on the node.\nUsed only for EE", "type": "boolean" }, "ReadyRePullImage": { "description": "Used only for EE async edge agent\nReadyRePullImage is a flag to indicate whether the auto update is trigger to re-pull image\nDeprecated(2.36): use DeployerOptionsPayload.ForceRecreate instead", "type": "boolean" }, "RegistryCredentials": { "description": "RegistryCredentials holds the credentials for a Docker registry.\nUsed only for EE", "items": { "$ref": "#/$defs/edge.RegistryCredentials" }, "type": "array" }, "RetryDeploy": { "description": "RetryDeploy is a flag indicating if the agent must retry to deploy the stack if it fails.\nUsed only for EE", "type": "boolean" }, "RetryPeriod": { "description": "RetryPeriod specifies the duration, in seconds, for which the agent should continue attempting to deploy the stack after a failure\nUsed only for EE", "type": "integer" }, "RollbackTo": { "description": "RollbackTo specifies the stack file version to rollback to (only support to rollback to the last version currently)", "type": "integer" }, "StackFileContent": { "description": "Content of the stack file (for compatibility to agent version less than 2.19.0)", "type": "string" }, "SupportRelativePath": { "description": "Is relative path supported", "type": "boolean" }, "Version": { "description": "Version of the stack file", "type": "integer" } }, "type": "object", "$defs": { "edge.DeployerOptionsPayload": { "properties": { "ForceRecreate": { "description": "ForceRecreate is a flag indicating if the agent must force the redeployment of the stack.\nThis field is only used when the Force Redeployment is triggered.\nOnce the stack is redeployed, this field will be reset to false.\nFor standard edge agent, this field is used in agent side\nFor async edge agent, this field is used in both agent side and server side.\nThis flag drives `docker compose up --force-recreate` option", "type": "boolean" }, "Prune": { "description": "Prune is a flag indicating if the agent must prune the containers or not when creating/updating an edge stack\nThis flag drives `docker compose up --remove-orphans` and `docker stack up --prune` options\nUsed only for EE", "type": "boolean" }, "RemoveVolumes": { "description": "RemoveVolumes is a flag indicating if the agent must remove the named volumes declared\nin the compose file and anonymouse volumes attached to containers\nThis flag drives `docker compose down --volumes` option\nUsed only for EE", "type": "boolean" } }, "type": "object" }, "edge.RegistryCredentials": { "properties": { "Secret": { "type": "string" }, "ServerURL": { "type": "string" }, "Username": { "type": "string" } }, "type": "object" }, "filesystem.DirEntry": { "properties": { "Content": { "type": "string" }, "IsFile": { "type": "boolean" }, "Name": { "type": "string" }, "Permissions": { "$ref": "#/$defs/os.FileMode" } }, "type": "object" }, "os.FileMode": { "enum": [ 2147483648, 1073741824, 536870912, 268435456, 134217728, 67108864, 33554432, 16777216, 8388608, 4194304, 2097152, 1048576, 524288, 2401763328, 511, 2147483648, 1073741824, 536870912, 268435456, 134217728, 67108864, 33554432, 16777216, 8388608, 4194304, 2097152, 1048576, 524288, 2401763328, 511 ], "type": "integer", "x-enum-comments": { "ModeAppend": "a: append-only", "ModeCharDevice": "c: Unix character device, when ModeDevice is set", "ModeDevice": "D: device file", "ModeDir": "d: is a directory", "ModeExclusive": "l: exclusive use", "ModeIrregular": "?: non-regular file; nothing else is known about this file", "ModeNamedPipe": "p: named pipe (FIFO)", "ModePerm": "Unix permission bits, 0o777", "ModeSetgid": "g: setgid", "ModeSetuid": "u: setuid", "ModeSocket": "S: Unix domain socket", "ModeSticky": "t: sticky", "ModeSymlink": "L: symbolic link", "ModeTemporary": "T: temporary file; Plan 9 only" }, "x-enum-varnames": [ "ModeDir", "ModeAppend", "ModeExclusive", "ModeTemporary", "ModeSymlink", "ModeDevice", "ModeNamedPipe", "ModeSocket", "ModeSetuid", "ModeSetgid", "ModeCharDevice", "ModeSticky", "ModeIrregular", "ModeType", "ModePerm" ] }, "portainer.HelmConfig": { "properties": { "Atomic": { "description": "Enable automatic rollback on deployment failure (equivalent to helm --atomic flag)", "type": "boolean" }, "ChartPath": { "description": "Path to a Helm chart folder for Helm git deployments", "type": "string" }, "Timeout": { "description": "Timeout for Helm operations (equivalent to helm --timeout flag)", "type": "string" }, "ValuesFiles": { "description": "Array of paths to Helm values YAML files for Helm git deployments", "items": { "type": "string" }, "type": "array" }, "Version": { "description": "Helm chart version from Chart.yaml (read-only, extracted during Git sync)", "type": "string" } }, "type": "object" }, "portainer.Pair": { "properties": { "name": { "type": "string" }, "value": { "type": "string" } }, "type": "object" } } }