Skip to content
Proud to collaborate with Microsoft for Startups

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 ​

PropertyValue
Workflow typeAtomic
LibraryApp-apphost
Version1.0

Input Schema ​

FieldTypeRequiredDefaultDescription
organization_uuiduuidYes—Owning organization; rows outside it read as already deleted.
site_uuiduuidNo—HostedSite UUID (this or identity_app_uuid is required).
identity_app_uuiduuidNo—Lookup by the identity app the site authenticates against.

Output Schema ​

FieldTypeRequiredDefaultDescription
site_uuiduuidNo—UUID of the deleted (or already-absent) hosted_site.
slugstringNo—Released subdomain label; omitted when the row was already gone.
urlstringNo—Public URL that no longer serves this site.
organization_uuiduuidNo——
identity_app_uuiduuidNo——
deletedbooleanYes—True when this run removed a hosted_site row.
already_deletedbooleanYes—True when no matching site existed in the organization.
s3_objects_deletedintegerNo—Objects removed under apps/<slug>/.
failure_reasonstringNo——
failure_typestringNo——
failed_actionstringNo——
failed_at_statestringNo——
failed_stepjsonNo——
failed_layerjsonNo——
errorstringNo——
error_typestringNo——
reasonstringNo——

States ​

StateInitialTerminalSuccessAuto-advanceDescription
pendingYesNo—executeDelete accepted; will tear down serving state and the hosted_site row
completedNoYesYes—Site deleted (or already absent); quota slot released
failedNoYesNo—Delete rejected or AWS teardown failed

State Diagram ​

Transitions ​

FromActionToDescription
pendingexecutecompletedTear down KVS/S3 then delete the hosted_site row
* (any state)failfailedTerminal failure

Outcomes ​

OutcomeTypeDescriptionState Data Keys
deletedSUCCESSHosted site deleted (or already absent); slug and quota slot releasedsite_uuid, deleted, already_deleted
failedFAILUREApphost workflow failedfailure_reason

API Usage ​

bash
POST /api/workflows/start
Content-Type: application/json

{
  "workflow_type": "apphost.site.delete",
  "initial_data": {
    "organization_uuid": "value"
  }
}