Deploy an AI model edition to devices
POST/api/v1/orgs/{orgId}/ai-models/{modelId}/editions/{edition}:deploy
Deploys a specific model edition to one or more edge devices.
• Each target group can specify ACL rules and pre/post lifecycle commands.
• PreCmd.action meanings: NOOP (skip), CHECK_DISK_USAGE (validate capacity).
• ValidateCmd.action meanings: NOOP (skip), CHECKSUM_VERIFY (hash check). For CHECKSUM_VERIFY, params.expectedChecksum is the hex digest of the model file, compared case-insensitively. Use the edition's fileHash without the sha256: prefix; a value with the prefix always fails. params.algorithm is sha256 (default) or sha512, in lowercase. • ApplyCmd.action meanings: NOOP (skip), ATOMIC_SWAP_AND_RESTART_CONTAINER (replace then restart runtime). For ATOMIC_SWAP_AND_RESTART_CONTAINER, params.name is the Docker container on the device to restart after the file is swapped (containerName is also accepted). The name may contain only letters, digits, and _ - . @. If the restart fails, the deployment still reaches DEPLOYED. • WEDA does not check params. Invalid values fail on the device, and the device state becomes REJECTED. The request example uses the checksum of an empty file; replace it with your model file's value.
• PostCmd.action meanings: NOOP (skip).
• The model file is delivered via Secured Volume and NATS file delivery.
• Returns 202 with per-device deployment IDs and initial state "SENT".
Deployment collision behaviour: when a target device already holds a model file, the outcome is decided by the deployment path (modelName + edition + fileName) and the file hash. modelId is not part of the key.
• Same path, same hash → 409; device unchanged.
• Same path, different hash → the new file replaces the old one in place; 202.
• Any difference in the path → a new deployment is created; both files coexist on the device.
Request
Responses
- 202
- 400
- 404
- 409
Created deployment with per-device status.
Bad Request
Not Found
Conflict. A file with the same deployment path (modelName + edition + fileName) and the same file hash is already deployed to at least one target device; nothing was changed on any device. Because modelId is not part of the key, this also occurs when a model is deleted and re-registered under the same name, edition and fileName. The re-registered model has a new modelId but resolves to the same path.