apphost.database.prepare ​
Resolve a hosted site to its identity app and namespace for AppData Postgres attach. Neon is not used.
Resolve the site's identity app so AppData can provision the instance.
Overview ​
| Property | Value |
|---|---|
| Workflow type | Atomic |
| Library | App-apphost |
| Version | 1.0 |
Input Schema ​
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
site_uuid | uuid | Yes | — | Claimed AppHost site whose identity app owns AppData |
Output Schema ​
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
site_uuid | uuid | Yes | — | — |
organization_uuid | uuid | Yes | — | — |
identity_app_uuid | uuid | Yes | — | — |
slug | string | Yes | — | — |
host | string | Yes | — | — |
url | string | Yes | — | — |
namespace | string | Yes | — | — |
connection_uuid | uuid | Yes | — | — |
field_manager | string | Yes | — | — |
failure_reason | string | No | — | — |
failure_type | string | No | — | — |
failed_action | string | No | — | — |
failed_at_state | string | No | — | — |
failed_step | string | No | — | — |
failed_layer | string | No | — | — |
error | string | No | — | — |
error_type | string | No | — | — |
States ​
| State | Initial | Terminal | Success | Auto-advance | Description |
|---|---|---|---|---|---|
pending | Yes | No | — | execute | Will resolve the site |
completed | No | Yes | Yes | — | Site resolved |
failed | No | Yes | No | — | Prepare rejected |
State Diagram ​
Transitions ​
| From | Action | To | Description |
|---|---|---|---|
pending | execute | completed | — |
* (any state) | fail | failed | — |
Outcomes ​
| Outcome | Type | Description | State Data Keys |
|---|---|---|---|
prepared | SUCCESS | Site ready for AppData instance provision | identity_app_uuid, namespace |
failed | FAILURE | Apphost workflow failed | failure_reason |
API Usage ​
bash
POST /api/workflows/start
Content-Type: application/json
{
"workflow_type": "apphost.database.prepare",
"initial_data": {
"site_uuid": "value"
}
}