Download OpenAPI specification:
Deploy, manage, and promote IoT services on the SmartTouch Cloud Platform.
The Deployment API lets you apply Service Spec Definitions (SSDs), check service health, roll back to previous revisions, list revision history, and manage canary traffic splits.
SmartTouch uses a GitOps model. In normal operation, deployments are triggered by commits to Git (picked up by Argo CD). Use this API for:
A service is defined by a smarttouch.yaml file. Submit its content as
application/yaml in POST /services. The platform validates the SSD before
creating or updating the service.
All write endpoints require an env query parameter: dev, staging, or prod.
Production deployments also require an administrator or platform-engineer role.
Returns all services deployed in the specified environment.
| env required | string Enum: "dev" "staging" "prod" Example: env=staging Target deployment environment |
| status | string Enum: "healthy" "degraded" "failed" "deploying" Filter by service health status |
| page | integer Default: 1 |
| per_page | integer <= 200 Default: 50 |
{- "status": 200,
- "data": [
- {
- "name": "remote-access-service",
- "environment": "staging",
- "status": "healthy",
- "image": "harbor.smarttouch.local/library/remote-access-service:1.4.2",
- "replicas": {
- "desired": 3,
- "ready": 3
}, - "current_revision": "v1.4.2",
- "last_deployed_at": "2026-06-08T08:00:00Z"
}
], - "meta": {
- "page": 1,
- "per_page": 50,
- "total": 1
}
}Apply a Service Spec Definition (SSD) to deploy or update a service.
The SSD is validated before deployment. If validation fails, the service is not changed and the response includes the list of validation errors.
Use dry_run=true to validate the SSD without applying it — useful in CI pipelines.
Deploying to prod requires the platform-engineer or administrator role.
| env required | string Enum: "dev" "staging" "prod" Example: env=staging Target deployment environment |
| dry_run | boolean Default: false Validate the SSD without applying it |
The smarttouch.yaml SSD content. Submit as application/yaml.
SmartTouch Service Spec Definition (SSD). See the SSD schema reference for all fields.
{ "service": { "name": "remote-access-service", "image": "harbor.smarttouch.local/library/remote-access-service:1.4.2" }, "deployment": { "replicas": 3 }, "remote-access": { "enabled": true, "broker-url": "wss://broker.smarttouch.local:8443", "protocols": [ "diagnostics", "shell" ] }, "observability": { "logs": true, "metrics": true, "traces": true }, "secrets": { "vault": [ { "path": "secret/data/remote-access-service/staging/broker-tls", "env": "BROKER_TLS_CERT" } ] }, "config": { "env": { "LOG_LEVEL": "info", "MAX_SESSIONS_PER_DEVICE": "10", "SESSION_TTL_SECONDS": "3600" } } }
{- "status": 200,
- "data": {
- "name": "remote-access-service",
- "environment": "staging",
- "status": "deploying",
- "image": "harbor.smarttouch.local/library/remote-access-service:1.4.2",
- "replicas": {
- "desired": 3,
- "ready": 0
}, - "current_revision": "v1.4.2",
- "previous_revision": "v1.4.1",
- "last_deployed_at": "2026-06-08T09:30:00Z",
- "dry_run": false
}
}Returns the current health, replica state, and deployment details for a service.
| serviceName required | string Example: remote-access-service Service name as defined in the SSD |
| env required | string Enum: "dev" "staging" "prod" Example: env=staging Target deployment environment |
{- "status": 200,
- "data": {
- "name": "remote-access-service",
- "environment": "staging",
- "status": "healthy",
- "image": "harbor.smarttouch.local/library/remote-access-service:1.4.2",
- "replicas": {
- "desired": 3,
- "ready": 3
}, - "current_revision": "v1.4.2",
- "previous_revision": "v1.4.1",
- "last_deployed_at": "2026-06-08T09:30:00Z",
- "argo_sync_status": "Synced"
}
}Permanently removes a service from the platform in the specified environment.
All running pods are terminated. This action cannot be undone.
Requires the platform-engineer or administrator role.
| serviceName required | string Example: remote-access-service Service name as defined in the SSD |
| env required | string Enum: "dev" "staging" "prod" Example: env=staging Target deployment environment |
{- "error": "unauthorized",
- "message": "Bearer token is missing or has expired.",
- "status": 401
}Returns the deployment history for a service in reverse chronological order.
| serviceName required | string Example: remote-access-service Service name as defined in the SSD |
| env required | string Enum: "dev" "staging" "prod" Example: env=staging Target deployment environment |
| page | integer Default: 1 |
| per_page | integer <= 100 Default: 20 |
{- "status": 200,
- "data": [
- {
- "revision": "v1.4.2",
- "image": "harbor.smarttouch.local/library/remote-access-service:1.4.2",
- "deployed_at": "2026-06-08T09:30:00Z",
- "deployed_by": "alice@example.com",
- "status": "current"
}, - {
- "revision": "v1.4.1",
- "image": "harbor.smarttouch.local/library/remote-access-service:1.4.1",
- "deployed_at": "2026-06-07T14:00:00Z",
- "deployed_by": "alice@example.com",
- "status": "previous"
}, - {
- "revision": "v1.4.0",
- "image": "harbor.smarttouch.local/library/remote-access-service:1.4.0",
- "deployed_at": "2026-06-06T10:00:00Z",
- "deployed_by": "bob@example.com",
- "status": "available"
}
], - "meta": {
- "page": 1,
- "per_page": 20,
- "total": 3
}
}Roll back a service to a previous revision. If revision is omitted, rolls back
to the immediately preceding revision.
Rollback creates a new deployment using the specified revision's image tag. The previous revision becomes available for rollback in turn.
Requires the developer role for dev, platform-engineer for staging and prod.
| serviceName required | string Example: remote-access-service Service name as defined in the SSD |
| env required | string Enum: "dev" "staging" "prod" Example: env=staging Target deployment environment |
| revision | string Target revision tag. Omit to roll back to the immediately previous revision. |
{ }{- "status": 200,
- "data": {
- "name": "remote-access-service",
- "environment": "staging",
- "status": "deploying",
- "image": "harbor.smarttouch.local/library/remote-access-service:1.4.1",
- "replicas": {
- "desired": 3,
- "ready": 0
}, - "current_revision": "v1.4.1",
- "previous_revision": "v1.4.2",
- "last_deployed_at": "2026-06-08T10:00:00Z",
- "dry_run": false
}
}Returns the current canary traffic split and revision details for a service.
| serviceName required | string Example: remote-access-service Service name as defined in the SSD |
| env required | string Enum: "dev" "staging" "prod" Example: env=staging Target deployment environment |
{- "status": 200,
- "data": {
- "service": "remote-access-service",
- "environment": "staging",
- "canary_active": true,
- "stable": {
- "revision": "v1.4.1",
- "image": "harbor.smarttouch.local/library/remote-access-service:1.4.1",
- "weight": 80
}, - "canary": {
- "revision": "v1.4.2",
- "image": "harbor.smarttouch.local/library/remote-access-service:1.4.2",
- "weight": 20
}
}
}Adjust the percentage of traffic routed to the canary version.
Set weight to 100 to promote the canary to stable (all traffic).
Set weight to 0 to halt the canary (all traffic returns to stable).
Use POST /services/{serviceName}/canary/promote and
POST /services/{serviceName}/canary/halt for explicit promote/halt operations
with clearer intent.
| serviceName required | string Example: remote-access-service Service name as defined in the SSD |
| env required | string Enum: "dev" "staging" "prod" Example: env=staging Target deployment environment |
| weight required | integer [ 0 .. 100 ] Percentage of traffic to route to the canary version (0–100) |
{- "weight": 50
}{- "status": 200,
- "data": {
- "service": "remote-access-service",
- "environment": "dev",
- "canary_active": true,
- "stable": {
- "revision": "v1.4.1",
- "image": "string",
- "weight": 80
}, - "canary": {
- "revision": "v1.4.2",
- "image": "string",
- "weight": 20
}
}
}Stops the canary deployment and routes all traffic back to the stable revision. The canary revision remains deployed but receives 0% of traffic. Equivalent to setting weight to 0.
| serviceName required | string Example: remote-access-service Service name as defined in the SSD |
| env required | string Enum: "dev" "staging" "prod" Example: env=staging Target deployment environment |
{- "status": 200,
- "data": {
- "service": "remote-access-service",
- "environment": "dev",
- "canary_active": true,
- "stable": {
- "revision": "v1.4.1",
- "image": "string",
- "weight": 80
}, - "canary": {
- "revision": "v1.4.2",
- "image": "string",
- "weight": 20
}
}
}Promotes the canary version to stable — routes 100% of traffic to it. The previous stable revision is archived in revision history and can be used for rollback.
| serviceName required | string Example: remote-access-service Service name as defined in the SSD |
| env required | string Enum: "dev" "staging" "prod" Example: env=staging Target deployment environment |
{- "status": 200,
- "data": {
- "name": "remote-access-service",
- "environment": "staging",
- "status": "healthy",
- "image": "harbor.smarttouch.local/library/remote-access-service:1.4.2",
- "replicas": {
- "desired": 3,
- "ready": 3
}, - "current_revision": "v1.4.2",
- "previous_revision": "v1.4.1",
- "last_deployed_at": "2026-06-08T11:00:00Z",
- "dry_run": false
}
}