apphost.site.delete ​
Delete a hosted site: remove the CloudFront KVS mapping and S3 release prefix, drop the hosted_site row, and free the organization's site quota
Delete a hosted site: stop serving the slug, wipe release objects, drop the hosted_site row (frees the per-org site quota).
Inputs:
- organization_uuid: owning org (context-injected)
- site_uuid and/or identity_app_uuid: one is required
Rejected when custom hostnames are still attached. Idempotent if the site is already gone. Outputs: site_uuid, slug, url, deleted, already_deleted.
Overview ​
| Property | Value |
|---|---|
| Workflow type | Atomic |
| Library | App-apphost |
| Version | 1.0 |
Input Schema ​
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
organization_uuid | uuid | Yes | — | Owning organization; rows outside it read as already deleted. |
site_uuid | uuid | No | — | HostedSite UUID (this or identity_app_uuid is required). |
identity_app_uuid | uuid | No | — | Lookup by the identity app the site authenticates against. |
Output Schema ​
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
site_uuid | uuid | No | — | UUID of the deleted (or already-absent) hosted_site. |
slug | string | No | — | Released subdomain label; omitted when the row was already gone. |
url | string | No | — | Public URL that no longer serves this site. |
organization_uuid | uuid | No | — | — |
identity_app_uuid | uuid | No | — | — |
deleted | boolean | Yes | — | True when this run removed a hosted_site row. |
already_deleted | boolean | Yes | — | True when no matching site existed in the organization. |
s3_objects_deleted | integer | No | — | Objects removed under apps/<slug>/. |
failure_reason | string | No | — | — |
failure_type | string | No | — | — |
failed_action | string | No | — | — |
failed_at_state | string | No | — | — |
failed_step | json | No | — | — |
failed_layer | json | No | — | — |
error | string | No | — | — |
error_type | string | No | — | — |
reason | string | No | — | — |
States ​
| State | Initial | Terminal | Success | Auto-advance | Description |
|---|---|---|---|---|---|
pending | Yes | No | — | execute | Delete accepted; will tear down serving state and the hosted_site row |
completed | No | Yes | Yes | — | Site deleted (or already absent); quota slot released |
failed | No | Yes | No | — | Delete rejected or AWS teardown failed |
State Diagram ​
Transitions ​
| From | Action | To | Description |
|---|---|---|---|
pending | execute | completed | Tear down KVS/S3 then delete the hosted_site row |
* (any state) | fail | failed | Terminal failure |
Outcomes ​
| Outcome | Type | Description | State Data Keys |
|---|---|---|---|
deleted | SUCCESS | Hosted site deleted (or already absent); slug and quota slot released | site_uuid, deleted, already_deleted |
failed | FAILURE | Apphost workflow failed | failure_reason |
API Usage ​
bash
POST /api/workflows/start
Content-Type: application/json
{
"workflow_type": "apphost.site.delete",
"initial_data": {
"organization_uuid": "value"
}
}