Most endpoints live under /api/cloud-saas; Cloud App exposure endpoints live under
/api/cloud/exposures. All require Bearer token authentication.
| Query | Type | Description |
|---|---|---|
category | string | Filter by category |
q | string | Search query |
locale | string | Language for localized content (default 'en') |
Returns approved templates (official + community), sorted by category and score.
Response:
| Query | Type | Description |
|---|---|---|
locale | string | Language (default 'en') |
Returns a single approved template with full content. Supports space-rendered i18n descriptions.
Returns the template's declared environment variables, form fields, and auto-detected env references.
Response:
List or get templates authored by the current user, including pending/rejected ones. Same response shape as public templates.
| Field | Type | Required | Description |
|---|---|---|---|
slug | string | Yes | Kebab-case identifier (1–255 chars) |
name | string | Yes | Display name (1–255 chars) |
description | string | No | Markdown description |
content | object | Yes | CloudConfig snapshot |
tags | string[] | No | Up to 20 tags |
category | string | No | Category name (≤64 chars) |
baseCost | number | No | Estimated monthly cost in Shrimp Coins |
Content is validated against the template policy allowlist. Templates are submitted for review as pending.
Same fields as create, all optional. Only allowed for the author when the template is draft or rejected.
Re-submits a draft or rejected template for review. No body required.
Deletes own template at any review status.
| Query | Type | Description |
|---|---|---|
limit | number | Max results (50 default, 100 max) |
offset | number | Pagination offset (0 default) |
includeOrphans | '1' | Include orphaned namespaces without DB rows |
includeHistory | '1' | Include all historical deployment entries |
Returns the newest visible deployment per namespace. Uses a per-namespace deduplication strategy.
Returns aggregate cost snapshots for all visible SaaS deployments.
| Field | Type | Required | Description |
|---|---|---|---|
namespace | string | Yes | K8s-safe name (1–255 chars) |
name | string | Yes | Deployment display name (1–255) |
templateSlug | string | Yes | Template identifier |
resourceTier | string | Yes | lightweight, standard, or pro |
agentCount | number | No | Number of agent replicas (≥0) |
configSnapshot | object | Yes | Validated CloudConfig |
envVars | object | No | Key-value environment overrides |
runtimeContext | object | No | { locale?, timezone? } |
Creates a new deployment with billing. Validates the template, locks the namespace, and checks wallet balance (returns 402 if insufficient). The deployment is queued asynchronously.
This endpoint is for fresh instances only. The namespace must not have been used by the same user on the same cluster, even if the previous deployment has already been destroyed. To continue a stateful template instance, use the deployment id with POST /api/cloud-saas/deployments/:id/redeploy, resume, or restore.
Returns full deployment detail including current status, blocking info, and cost summary.
Returns cost summary for a specific deployment.
Cancels an active deploy or destroy task. Does not wait for namespace operation locks.
Queues a Pulumi destroy for the current deployment entry. Interrupts active operations.
| Field | Type | Required | Description |
|---|---|---|---|
mode | string | No | snapshot (default) or template |
templateSlug | string | No | Redeploy from a specific template |
configSnapshot | object | No | Explicit config after policy validation |
envVars | object | No | Override declared template env vars |
runtimeContext | object | No | { locale?, timezone? } |
Re-enqueues the same namespace with a new deployment history entry. Does not debit wallet. This is the stateful template path: it can reuse the namespace, Pulumi stack, PVC-backed runtime state, and Shadow provision state for the existing deployment instance.
| Query | Type | Description |
|---|---|---|
agent | string | Filter by agent name |
pod | string | Filter by pod name |
page | number | Page (1–100) |
limit | number | Per page (20–500, default 200) |
GET /logs returns an SSE event stream (text/event-stream) with real-time events: log, status, error, close. Terminates when deployment reaches terminal status.
GET /logs/history returns a plain JSON array of log entries.
| Query | Type | Description |
|---|---|---|
pod | string | Pod name (required for pod-logs) |
agent | string | Agent name |
tail | number | Lines to tail (default 200, max 2000) |
container | string | Container name (default 'openclaw') |
GET /pods lists K8s pods in the deployment namespace. GET /pod-logs streams live K8s pod logs via SSE.
/claim adopts a Shadow-Cloud-managed namespace with no DB row. /cleanup force-deletes an orphan namespace (admin only).
These endpoints publish runtime services from a Cloud deployment under stable Shadow-managed App hosts and keep the Space App installation, release metadata, and backup set in sync.
| Endpoint | Purpose |
|---|---|
/runtime/reconcile | Create or update runtime exposure records for HTTP services or Space Apps. |
/space-apps/publish | Allocate a stable host, publish a release, and optionally install the App into a Space. |
/status | Return exposure, release, installation, and backup status for one App key. |
/backup / /restore | Create or restore an App-level backup set that can include state, source, release, and installation metadata. |
/unpublish | Close the exposure and optionally uninstall the Space App. |
| Field | Type | Required | Description |
|---|---|---|---|
vars | array | Yes (PUT) | [{ key: string, value: string }] |
Values are encrypted at rest. GET returns masked values ('****'). GET by key returns decrypted value for editing.
| Field | Type | Required | Description |
|---|---|---|---|
key | string | Yes | Variable key |
value | string | Yes | Variable value |
isSecret | boolean | No | Whether to treat as secret (masked) |
groupName | string | No | Optional grouping |
| Field | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Group name (1–255 chars) |
Returns model providers discovered from installed Cloud plugins. Each entry includes plugin ID, provider details, and required secret fields.
Returns the current user's encrypted provider profiles. Values are masked.
| Field | Type | Required | Description |
|---|---|---|---|
id | string | No | Profile ID (for updates) |
providerId | string | Yes | Catalog provider ID (1–120 chars) |
name | string | Yes | Display name (1–255) |
enabled | boolean | No | Whether the profile is active |
config | object | No | Provider-specific config |
envVars | object | No | Encrypted env var values |
Validates model list in config and applies SSRF guard on any base URL.
Tests encrypted credentials against the provider API with 8s timeout and SSRF protection.
Fetches model list from the provider's native API and persists into the profile config.
Deletes the profile and all associated encrypted values.
Returns the current user's Shrimp Coin balance.
Response:
| Query | Type | Description |
|---|---|---|
limit | number | Max results (50 default, 100 max) |
offset | number | Pagination offset (0 default) |
Returns paginated wallet transaction history.
| Query | Type | Description |
|---|---|---|
limit | number | Max results (50 default, 100 max) |
offset | number | Pagination offset (0 default) |
Returns the user's cloud activity log (paginated), including deployment creation, pause, resume, backup, restore, and deletion events.
GET /schema returns the primary CloudConfig JSON Schema for frontend validation and editor autocomplete.
POST /validate accepts a raw JSON config snapshot and returns a validation summary with errors.