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
| Parameter | Type | Required | Description |
|---|---|---|---|
model_name | string | Yes | Model name |
model_version | string | Yes | Version to deploy |
devices | string[] | No | Explicit device IDs |
group | string | No | Target 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
| Parameter | Type | Required | Description |
|---|---|---|---|
model_name | string | Yes | Model name |
model_version | string | Yes | Version to deploy |
devices | string[] | No | Explicit device IDs |
group | string | No | Target device group name |
rollout_percentage | integer | No | Percentage of targets to activate |
Response
{
"deployment_id": "dep_abc123",
"status": "started",
"target_count": 2,
"activated_count": 1
}
Errors
| Status | Error | Description |
|---|---|---|
400 | bad_request | Invalid or missing request fields |
401 | unauthorized | Missing or invalid API key |
404 | not_found | Resource does not exist |
409 | conflict | Resource already exists or state conflict |
429 | rate_limited | Too many requests; check Retry-After |
500 | internal_error | Unexpected server error |