Skip to main content

Deployments API

Endpoints for preparing and executing targeted model deployments to devices or device groups.

Prepare a deployment

POST /api/v1/deploy/prepare

Validates targets and produces a deployment plan before execution.

Body Parameters

ParameterTypeRequiredDescription
model_namestringYesModel name
model_versionstringYesVersion to deploy
devicesstring[]NoExplicit device IDs
groupstringNoTarget device group name

Response

{
"ok": true,
"target_count": 25,
"resolved_targets": ["dev_abc123", "dev_def456"],
"warnings": []
}

Execute a deployment

POST /api/v1/deploy/execute

Executes deployment to explicit device IDs or a target group.

Body Parameters

ParameterTypeRequiredDescription
model_namestringYesModel name
model_versionstringYesVersion to deploy
devicesstring[]NoExplicit device IDs
groupstringNoTarget device group name
rollout_percentageintegerNoPercentage of targets to activate

Response

{
"deployment_id": "dep_abc123",
"status": "started",
"target_count": 2,
"activated_count": 1
}

Errors

StatusErrorDescription
400bad_requestInvalid or missing request fields
401unauthorizedMissing or invalid API key
404not_foundResource does not exist
409conflictResource already exists or state conflict
429rate_limitedToo many requests; check Retry-After
500internal_errorUnexpected server error