apphost.release.create
Create a pending_upload HostedRelease for a claimed apphost site and return a presigned S3 POST (size-capped) for the bundle upload. POST every upload_fields key (including x-amz-credential and x-amz-security-token), then file=@bundle.zip last. Publish/activation is a separate workflow (apphost.release.publish).
Open a new pending_upload HostedRelease and presign its bundle upload.
Overview
| Property | Value |
|---|---|
| Workflow type | Atomic |
| Library | App-apphost |
| Version | 1.0 |
Input Schema
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
site_uuid | uuid | Yes | — | UUID of the HostedSite to open a release for. |
organization_uuid | uuid | Yes | — | Organization UUID for tenant isolation; must match the site's owner. |
created_by_user_uuid | uuid | No | — | Wire identity of the member opening the release (stored on hosted_release). |
Output Schema
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
site_uuid | uuid | No | — | Echoed HostedSite UUID. |
release_uuid | uuid | No | — | UUID of the new HostedRelease (status=pending_upload). |
prefix | string | No | — | Immutable S3 prefix of the release: apps/<slug>/<release_uuid>/. |
upload_url | string | No | — | Presigned S3 POST URL for the bundle upload. |
upload_fields | json | No | — | SigV4 POST form. Required keys: key, policy, x-amz-algorithm, x-amz-credential, x-amz-date, x-amz-signature, x-amz-security-token. POST every returned field, then file=@bundle.zip last. If x-amz-credential or x-amz-security-token is missing, stop — do not invent fields or decode policy. |
expires_in_seconds | integer | No | — | Validity window of the presigned upload. |
max_bundle_bytes | integer | No | — | Size ceiling enforced by the POST policy (APPHOST_MAX_BUNDLE_BYTES). |
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 | — | — |
failed_at | string | No | — | — |
States
| State | Initial | Terminal | Success | Auto-advance | Description |
|---|---|---|---|---|---|
PENDING | Yes | No | — | execute | Release-create request accepted; will create row + presign upload |
COMPLETED | No | Yes | Yes | — | HostedRelease created; presigned upload returned |
FAILED | No | Yes | No | — | Release-create rejected or presign failed |
State Diagram
Transitions
| From | Action | To | Description |
|---|---|---|---|
PENDING | execute | COMPLETED | — |
* (any state) | fail | FAILED | — |
Outcomes
| Outcome | Type | Description | State Data Keys |
|---|---|---|---|
created | SUCCESS | Pending upload HostedRelease created with presigned POST | release_uuid, upload_url |
failed | FAILURE | Apphost workflow failed | failure_reason |
API Usage
bash
POST /api/workflows/start
Content-Type: application/json
{
"workflow_type": "apphost.release.create",
"initial_data": {
"site_uuid": "value",
"organization_uuid": "value"
}
}