list_cloudflare_hosting_targets
List available Cloudflare hosting targets so users can choose where to deploy their Worker: Staticbot-managed or their own connected account.
Instructions
List the Cloudflare accounts this app can be hosted in: Staticbot's managed account (the default) plus any Cloudflare account the user has connected. Call this before create_stack or create_deployment for a Cloudflare Workers / SSR app whenever the user has a connected Cloudflare account and might want the Worker deployed into it rather than hosted by Staticbot.
Read the response, do not compute from it:
managedis the Staticbot-hosted option. It is always present and always valid.customerOptionslists the user's own accounts — each with a ready-to-renderlabeland thevalueyou pass back verbatim. Passvaluethrough unchanged; never construct or edit one.noticesexplains accounts that could not be offered (a revoked credential, a missing Workers permission). Show these to the user — they are the reason an account is missing from the list.selectedValue/selectedHostnameare the defaults whenstackIdwas supplied.
Do not decide for the user. If customerOptionsAvailable is false, do not ask — Staticbot hosting is the only choice. If it is true, present the options (including the managed one) and let the user pick. Deploying into the user's own account means the Worker, its domain and its certificate live in their account, so it is their decision, not an inference from their setup.
Before creating anything with a customer choice, call preflight_cloudflare_hosting — it reports collisions that would otherwise fail the deployment.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| stackId | No | Optional stack ID. When supplied, `selectedValue` and `selectedHostname` come back as that stack's current hosting choice and hostname, suitable as the default selection. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes | Parsed JSON response from the Staticbot public API |