Skip to main content

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​

Created deployment with per-device status.