Xuda Cloud Hosting API Reference
Xuda Cloud Hosting API Reference
This reference covers the full method surface of Xuda Cloud Hosting: the 55 CPI methods that price a server, place it in a region, provision it, power it, resize it, back it up, give it addresses and disks, manage its SSH keys and finally destroy it. It is written for developers automating server fleets from their own code, for anyone wiring Xuda hosting into an AI agent through MCP, and for anyone who needs to know exactly which of these calls an external API key can reach and which are dashboard-only. Every method key, parameter name, type and required flag below is taken from the shipped method contract.
How To Call These Methods
Every method here is a CPI method. CPI methods are dispatched by name over the Xuda API and MCP layer, and the normal credential for that layer is the account API key. For the transport-level detail, including how requests are framed and how the MCP layer exposes methods, see /api-mcp-integration.
Two rules decide whether a given call works for you:
- The private flag. An API key with
api_access: 'full'may call any method that is not markedprivate: true. A method markedprivate: trueis excluded from the API-key catalog and refused for API-key callers, which makes it a dashboard-session method. Most of the provisioning and farm-management surface of this product is private. - Clearance.
publicneeds no authentication at all.userneeds any signed-in account.adminneeds anadminaccess type on the target app, and superusers always pass.
There is one exception worth knowing about. A narrowly scoped API key whose api_allow_methods list names a method explicitly is checked only against that list, so a scoped key can reach methods that a full key cannot. The scoped key a Full Stack VPS carries is exactly that case.
What The Availability Labels Mean
Every method below carries one explicit availability line. Read it first, because it tells you whether you can call the method from your own code today.
- Availability: API key means an external developer API key or the MCP layer can call it. The method is not flagged private, so it appears in the API-key catalog.
- Availability: Dashboard session means a signed-in user in the Xuda dashboard can call it, and an API key cannot. The method is flagged private. The account identity comes from the session, never from a parameter.
- Availability: Public endpoint means no authentication at all. The method has
publicclearance and answers to anyone who reaches the origin. - Availability: Operator only means Xuda staff acting on Xuda's own fleet, listed only for completeness. There is nothing in it for a customer account.
The split for this product is 15 methods on API key, 37 on dashboard session, 2 public endpoints and 1 operator method.
Method Index
| Method | What It Does |
|---|---|
| get_suggested_region | Suggests which macro region to preselect from the caller's IP country. |
| get_region_hosting_options | Resolves a macro region into a real hosting offer: capacity, price and metros. |
| get_farm_availability | Answers whether a Xuda farm node can host a given spec, where, and at what price. |
| get_platform_regions | Lists the legacy DigitalOcean regions and the sizes each one offers. |
| get_os_images | Provider-aware operating system image list for the setup step. |
| get_digitalocean_images | Lists DigitalOcean images of a requested type. |
| get_price_obj | Returns the whole pricing object, including the full server slug catalog. |
| get_platform_servers_info | Retrieves platform servers information, unauthenticated. |
| deploy_vps | Provisions a standalone VPS and its cost ledger. |
| deploy_full_stack_vps | Provisions a VPS with a scoped CPI key, its own database and a developer toolchain. |
| deploy_datacenter | Provisions a replicated-CouchDB datacenter server. |
| deploy_webserver | Provisions a standalone webserver app. |
| deploy_another | Re-deploys an existing app under a new name, region and server type. |
| get_account_vps | Lists the standalone virtual servers on the account. |
| get_account_datacenters | Lists the datacenters on the account. |
| get_deploy_info | Returns summary deployment information for one app. |
| get_app_server_usage | Returns a CPU, memory, disk and network time series for a server. |
| check_app_web_preview | Probes the app's own public web URL and reports whether it is serving. |
| get_vps_diagnose_report | Returns the last stored Auto Diagnose report for a server. |
| turn_app_on | Powers the machine on. |
| turn_app_off | Powers the machine off, gracefully first. |
| reboot_server | Hard resets the machine. |
| resize_server | Resizes CPU, RAM and disk to a new server slug. |
| reinstall_datacenter_resources | Reinstalls a datacenter's hosting resources, behind an emailed code. |
| validate_destroy_app | Checks whether an app can be permanently deleted. |
| destroy_app | Permanently deletes the app, destroys the machine and ends billing. |
| create_backup | Takes an immediate backup of a server. |
| get_app_backups | Lists a server's backups, newest first. |
| enable_auto_backup | Turns automatic backups on and seeds a schedule. |
| disable_auto_backup | Turns automatic backups off and closes the billing segment. |
| update_auto_backup_preferences | Sets the backup weekdays and how many copies to keep. |
| restore_backup | Restores a backup in place or onto a brand-new server. |
| destroy_backup | Permanently deletes one backup. |
| farm_volume_create | Creates a block-storage volume on the farm and bills it. |
| farm_volume_attach | Attaches a volume to the machine on the next free SCSI slot. |
| farm_volume_detach | Detaches a volume, keeping the data. |
| farm_volume_resize | Grows a volume. Grow only. |
| farm_volume_delete | Deletes a volume and releases its storage. |
| farm_volume_list | Lists an app's block-storage volumes. |
| get_app_ipv4_availability | Reports dedicated IPv4 quota, price, setup state and IPv6 support. |
| farm_enable_dedicated_ip | Binds a dedicated public IPv4 to the server and reprices it. |
| farm_disable_dedicated_ip | Removes the dedicated IPv4 add-on and reprices. |
| request_dedicated_ip | Asks Xuda to order an IPv4 when the node pool is empty. |
| farm_detect_node_ipv6 | Derives the hosting node's routed IPv6 prefix. |
| get_app_firewall | Reads the app's firewall configuration. |
| configure_app_firewall | Updates the app's inbound firewall rules. |
| get_ssh_keys | Lists the account's stored SSH public keys. |
| save_ssh_key | Validates and stores an SSH public key, with optional expiry. |
| set_ssh_key_enabled | Switches a key on or off. Off strips it from every server. |
| delete_ssh_key | Soft-deletes an SSH key from the account. |
| assign_ssh_keys | Installs the given keys on a server. |
| revoke_ssh_keys | Removes the given keys from a server. |
| get_ssh_key_events | Reads the account's SSH access log. |
| publish_templates | Ensures every farm node carries the golden templates. |
| digitalocean_webhook | First-boot callback a new DigitalOcean droplet curls from cloud-init. |
get_suggested_region
Get Suggested Region
Suggests which of the five macro regions to preselect, based on the caller's IP country as reported by Cloudflare's cf-ipcountry header. Returns { country, macro_region }, with macro_region: null when the country is unknown or absent so the caller can fall back to its own guess. US and CA map to na. A fixed list of Latin American and Caribbean codes maps to latam. A fixed list of Asian and Pacific codes maps to apac. Everything else, including Europe, Africa, the Middle East, Central Asia and Russia, maps to emea.
Availability: API key
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
country |
string | No | ISO-3166-1 alpha-2 country code, used only when no cf-ipcountry header is present. |
Notes
- Clearance
user. Not private. Nomin_plan. Not a job. - The fields are not declared in the method contract; the parameter above is read from the implementation.
- This is a hint, not a placement decision. Confirm real capacity with
get_region_hosting_optionsbefore you deploy.
get_region_hosting_options
Get Region Hosting Options
Resolves one of the five macro regions into an authoritative hosting offer: whether Xuda's own farm can host the requested size there, the price that will actually be billed, the per-metro availability list you can pin to, the DigitalOcean datacenters that region owns, and a plain-language message when the farm cannot serve the request. This is the single call the deploy wizard trusts for placement and price, and it deliberately never auto-selects DigitalOcean as a fallback.
Availability: API key
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
macro_region |
string | Yes | One of na, latam, emea, apac, africa. An unknown value returns an error listing the valid keys. |
app_server_type |
string | No | Server slug (for example shared_vps_2). The VM spec and the disk-tier preference are derived from it. |
app_type |
string | No | The app type being deployed (vps, datacenter, and so on), used for the legacy free-form price path. |
dedicated_ip |
boolean | No | When true, placement is resolved against nodes that have free dedicated IPv4 capacity. |
pinned_datacenter |
string or object | No | A metro code, or { id, provider } where provider is farm or do, to resolve that one location's availability and price. |
cores |
number | No | Legacy explicit core count, overrides the slug-derived value. |
ram_gb |
number | No | Legacy explicit RAM, overrides the slug-derived value. |
disk_gb |
number | No | Legacy explicit disk, overrides the slug-derived value. |
tier |
string | No | Legacy coarse tier (light or strong). |
Notes
- Clearance
user. Not private. Nomin_plan. Not a job. - The fields are not declared in the method contract; the list above is read from the implementation.
- Two of the five macro regions,
latamandafrica, have no farm metros at all today. Both answerprovider: 'unavailable'withreason: 'no_farm_region'and the message "xuda Farm is not available in {region} yet." - Automatic failover to DigitalOcean is switched off platform-wide, so a region without capacity is reported as unavailable rather than quietly served from another cloud.
- Some messages this method returns still carry internal vendor wording. Treat the structured fields, not the message string, as the contract.
get_farm_availability
Get Farm Availability
Answers, for a given region and VM spec, whether a Xuda farm node can host it, which node, at what monthly price, in which named city, whether that node supports IPv6, and what dedicated IPv4 capacity it has (maximum, used, available, the pool versus bank breakdown, an unlimited flag, the add-on price, and whether enabling the IP would relocate the server to a different region). When an app_id is supplied it checks resize growth on that server's own node instead of a fresh placement, so a resize is never falsely told there is no capacity.
Availability: Dashboard session
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
region |
string | No | Macro-region key or metro code to prefer. |
tier |
string | No | Legacy coarse tier (light or strong) used by the free-form pricing path. |
cores |
number | No | Requested vCPU count. |
ram_gb |
number | No | Requested RAM in GB. |
disk_gb |
number | No | Requested disk in GB. |
app_type |
string | No | App type, used for the price floor (vps gets the lower vps_min floor). |
dedicated_ip |
boolean | No | Route placement to a node with free IPv4 capacity. |
app_id |
string | No | When present, checks in-place resize capacity on that server's own node. |
user_coords |
array | No | [lat, lng] used to order candidate nodes by distance. |
allowed_locations |
array | No | Metro codes the placement may use. An explicitly empty array means no node. |
disk_pref |
array | No | Ordered disk-tier preference chain, for example ["ssd","nvme"]. |
prefer_faster |
boolean | No | Prefer a higher perf_rank node ahead of intra-region distance. |
Notes
- Clearance
user.private: true, so an API key cannot call it. Useget_region_hosting_optionsinstead, which is API-key reachable and returns the same placement verdict for a region. - The fields are not declared in the method contract; the list above is read from the implementation.
- A
reasonfield distinguishesfarm_disabled,node_unreachableandno_capacity, so "the farm is off" is never confused with "this box is full". - Capacity is not a stored counter. Node free cores, RAM and disk are re-read from the live hypervisor every 5 minutes, and a candidate node must hold 20 percent more free capacity than the VM needs before it is offered.
get_platform_regions
Get Platform Regions
Returns the live DigitalOcean region list straight from the provider API, each entry carrying its slug, its name, and the size ids that region offers. The dashboard's size picker uses it to grey out sizes that are unavailable in a legacy DigitalOcean region.
Availability: API key
Parameters
This method takes no parameters. No fields are declared in the method contract and the implementation takes no arguments.
Notes
- Clearance
user. Not private. Nomin_plan. Not a job. Cached, and markedmcp: true, so it is also exposed as an AI-agent tool. - This describes the legacy DigitalOcean backend, not Xuda's own farm. For farm placement use
get_region_hosting_options.
get_os_images
Get OS Images
Provider-aware operating system image list. On the Xuda farm path it returns the five-entry cloud-image catalog shaped like DigitalOcean's (slug, name, distribution, version) so a picker can group them by family. Otherwise it returns the live DigitalOcean image list.
Availability: Dashboard session
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
provider |
string | No | 'global' selects the Xuda farm catalog. |
app_hosting_preference |
string | No | 'global' has the same effect as provider: 'global'. |
type |
string | No | Passed through to the DigitalOcean image list when falling through. |
Notes
- Clearance
user.private: true, so an API key cannot call it. Not a job. - The fields are not declared in the method contract; the list above is read from the implementation.
- The farm catalog has exactly five images: Ubuntu 24.04 LTS, Ubuntu 22.04 LTS, Debian 12 Bookworm, Rocky Linux 9 and AlmaLinux 9. There is no marketplace or one-click application image on the farm path.
get_digitalocean_images
Get DigitalOcean Images
Lists DigitalOcean images of the requested type (distribution, application, and so on) through the DigitalOcean API, 100 per page.
Availability: Dashboard session
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
type |
string | Yes | DigitalOcean image type to filter by, for example application or distribution. |
page |
number | No | Page number, defaults to 1. Implementation only, not declared in the method contract. |
Notes
- Clearance
user.private: true, so an API key cannot call it. Not a job. - This only matters on the legacy DigitalOcean path, which is not the default backend.
get_price_obj
Get Price Obj
Returns the whole configured pricing object, including the full server_slugs catalog, the server_types labels and descriptions, and every add-on rate. This is how a client knows what to put on a size card before anything is deployed.
Availability: API key
Parameters
This method takes no parameters. No fields are declared in the method contract.
Notes
- Microservice
misc_module. Clearanceuser. Not private. Nomin_plan. Not a job. Cached, and markedmcp: true. - The catalog covers the whole platform. Filter it by
server_group: 'vps'to get the 17 sizes the VPS creation flow offers.
get_platform_servers_info
Get Platform Servers Info
Retrieves platform servers information. It has public clearance, so it needs no authentication at all.
Availability: Public endpoint
Parameters
This method takes no parameters. No fields are declared in the method contract.
Notes
- Microservice
misc_module. Clearancepublic. Not private, so an API key and the MCP layer reach it too, and it is markedmcp: true. Not a job.
deploy_vps
Deploy VPS
Provisions a standalone VPS. It saves an app document with its cost ledger, resolves the hosting backend from the region and the slug, and creates the machine. On the farm path the call returns immediately with the app document while the clone, boot and OS install run in the background, and the job self-finalizes to success or failure. On the DigitalOcean path it awaits the droplet create instead. A requested dedicated IPv4 that cannot be honored anywhere is silently stripped rather than failing the deploy.
Availability: Dashboard session
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
data.app_name |
string | Yes | Denotes the name of the deployment. |
data.app_region |
string | No | The location where the server will be set up. The method contract declares the legacy DigitalOcean slug list as its options (nyc1, nyc2, nyc3, sfo1, sfo2, sfo3, tor1, lon1, ams2, ams3, fra1, syd1, blr1, sgp1), while the current dashboard sends a macro-region key (na, latam, emea, apac, africa). The placement code resolves either form. |
data.app_server_type |
string | No | Server classification indicating CPU, memory and disk size. Options: shared_vps_05, shared_vps_1, shared_vps_2, shared_vps_4, shared_vps_8, optimized_vps_2, optimized_vps_4, optimized_vps_8, optimized_vps_16, performance_vps_4, performance_vps_16, performance_vps_24, performance_vps_32, large_vps_8, large_vps_16, large_vps_24, large_vps_32. |
Additional parameters are read by the implementation but not declared in the method contract: data.app_hosting_preference ('global' opts into the Xuda farm), data.os (farm OS image slug), data.setup.image (DigitalOcean image id), data.dedicated_ip (boolean), data.pinned_datacenter, data.farm_location, data.enable_backups, data.enable_auto_diagnose, and data.farm_spec (legacy free-form {tier, cores, ram_gb, disk_gb}).
Notes
- Clearance
user.private: true, so an API key cannot call it. Nomin_plan: any signed-in account, including the Free plan, can deploy a VPS.broadcast: true. - Job steps reported on the progress bar: "initiating process", "creating vps server", "setting vps firewall", "setting vps backup plan", "connecting to vps server", "installing vps resources", "activating the server".
- A raw VPS is marked active as soon as it boots. It does not wait for an install webhook the way a platform deployment does.
- If the chosen region has no capacity the create is refused with "Service temporarily unavailable, please try again later." rather than being moved to another provider. On the DigitalOcean path an unusable region answers "This region is not available for deployment. Please choose a different region."
- Creation stamps a per-deployment cost ledger on the app document, and every later spec or add-on change closes that billing segment and opens a new one, so mid-cycle changes prorate.
- Every new VPS gets a free public web address on
*.xuda.appand durable SSH access provisioned automatically when the machine comes up, plus a firewall model, with no dedicated IPv4 required.
deploy_full_stack_vps
Deploy Full Stack VPS
Provisions a VPS on the exact same code path as deploy_vps, plus four things: a scoped CPI API key is issued before provisioning, the enabled capability groups are recorded on the app, the box gets its own project database, and its cloud-init installs Node, the xuda CLI and codex with the key baked into the box's own config and shell profile.
Availability: Dashboard session
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
data.app_name |
string | Yes | Denotes the name of the deployment. |
data.app_region |
string | No | Same region semantics as deploy_vps. |
data.app_server_type |
string | No | The same slug options as deploy_vps are declared in the method contract, but the picker for this flow shows the managed server group instead, and a shared type is refused server-side as too small for the toolchain. |
data.full_stack_tools |
array of string | No | The CPI capability groups this box exposes to the developer and to AI agents. Each group expands to a set of CPI methods. Defaults to the configured default tool set when omitted. |
Notes
- Clearance
user.private: true, so an API key cannot call it. Nomin_plan.broadcast: true. - Job steps: "initiating process", "issuing CPI access key", "creating vps server", "setting vps firewall", "setting vps backup plan", "connecting to vps server", "installing full stack toolchain", "activating the server".
- The scoped key this flow issues is a narrowly scoped key, so the box can reach exactly the methods its capability groups name, including ones a
fullaccount key cannot. - A Full Stack VPS gets extra dashboard tabs of its own (Data, Tools, Plugins, API keys) that a plain VPS does not have.
deploy_datacenter
Deploy Datacenter
Provisions a datacenter app: a server running replicated CouchDB that acts as the storage backbone for projects. It generates a 20-character database admin password, saves the app document with its cost ledger, and creates the machine from the datacenter image. Unlike a VPS, this call awaits the build to completion.
Availability: Dashboard session
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
data.create_datacenter.app_name |
string | Yes | Denotes the name of the deployment. |
data.create_datacenter.app_region |
string | No | The location where the server will be set up. Declared options are the DigitalOcean slug list (nyc1 through sgp1); the current wizard sends a macro-region key. It carries a mandatory_dependencies link to data.app_datacenter. |
data.create_datacenter.app_server_type |
string | No | Options: shared_hosting_1, shared_hosting_2, shared_hosting_4, shared_hosting_8, optimized_hosting_2, optimized_hosting_4, optimized_hosting_8, optimized_hosting_16, performance_hosting_4, performance_hosting_16, performance_hosting_24, performance_hosting_32, large_hosting_8, large_hosting_16, large_hosting_24, large_hosting_32. The wizard hides the shared tier for datacenters. |
Notes
- Clearance
admin.private: true, so an API key cannot call it.broadcast: true. - Plan gate:
min_plan: pro. A Free account is refused with "Upgrade to {Plan} or higher to use it." - A datacenter prices off the
deploymentserver group, not the VPS group.
deploy_webserver
Deploy Webserver
Provisions a standalone webserver app: it saves a webserver app document and creates a machine from the chosen image. Region and server type are both mandatory here, unlike the VPS flow.
Availability: Dashboard session
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
data.app_name |
string | Yes | Denotes the name of the deployment. |
data.app_region |
string | Yes | The location where the server will be set up. Declared options are the DigitalOcean slug list. |
data.app_server_type |
string | Yes | Server classification. The same 17 VPS slug options as deploy_vps. |
Notes
- Clearance
user.private: true, so an API key cannot call it. Nomin_plan.broadcast: true. - Job steps: "initiating process", "creating webserver", "setting webserver firewall", "setting webserver backup plan", "connecting to webserver server", "installing webserver resources", "activating webserver server".
deploy_another
Deploy Another
Re-deploys an existing app (datacenter, VPS or deployment) under a new name, region and server type, cascading to its child deployments. This is how you clone a server into a different region.
Availability: Dashboard session
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
app_id |
string | Yes | Unique identifier of the application this request targets. |
data.app_name |
string | Yes | Name of the application to create. |
data.app_region |
string | Yes | Deployment region to use for the new application. |
Notes
- Clearance
admin.private: true, so an API key cannot call it.broadcast: true. - Plan gate:
min_plan: pro. - This creates a second server. It does not move the original. Moving an existing server between regions is not built: a resize stays in the region it is already in.
get_account_vps
Get Account VPS
Returns the standalone virtual servers associated with the account, read from the master user_vps view. This is the "list my servers" call.
Availability: API key
Parameters
This method takes no parameters. No fields are declared; the account is taken from the session or the key.
Notes
- Microservice
account_module. Clearanceuser. Not private. Nomin_plan. Not a job. Markedmcp: true.
get_account_datacenters
Get Account Datacenters
Returns the datacenters associated with the account, read from the master user_datacenters view.
Availability: API key
Parameters
This method takes no parameters. No fields are declared; the account is taken from the session or the key.
Notes
- Microservice
account_module. Clearanceuser. Not private. Nomin_plan. Not a job. Markedmcp: true.
get_deploy_info
Get Deploy Info
Returns summary deployment information for an app: its type, its status, its access URL, its deploy data, and the replicate app's icon properties. The dashboard and the Full Stack VPS agent tool set both use it to describe a box.
Availability: API key
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
app_id |
string | Yes | Unique identifier of the application this request targets. |
Notes
- Not private. No
min_plan. Not a job. - No
clearanceis declared for this method in the method contract, unlike every neighboring method. Do not read that as a guarantee either way, and do not build an access model on it.
get_app_server_usage
Get App Server Usage
Returns a time series of a server's CPU, memory, disk and network usage between two timestamps. Farm VMs are read from the hypervisor's own time series over the node API. DigitalOcean droplets are read from DigitalOcean's monitoring API. External customer-owned servers are sampled over SSH on demand and returned in the same matrix shape. An external app returns an empty series.
Availability: API key
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
app_id |
string | Yes | Unique identifier of the application this request targets. |
ts_start |
number | Yes | Start timestamp. |
ts_end |
number | Yes | End timestamp. |
Notes
- Clearance
admin. Not private. Nomin_plan. Not a job. - On an external VPS the call is refused with
code: -91unless the owner has granted themetricsaccess scope. A first-party Xuda VPS is not gated this way.
check_app_web_preview
Check App Web Preview
Probes the app's own public web URL, either its *.xuda.app subdomain or its bound custom domain, and reports whether it serves a 200-ish response, so a dashboard shows a live preview only when the site is actually up. Returns { ok, status, url } and never throws.
Availability: Dashboard session
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
app_id |
string | Yes | The app whose public web URL to probe. Also accepted as data.app_id. |
Notes
- Clearance
user.private: true, so an API key cannot call it. Not a job. - The fields are not declared in the method contract; the parameter above is read from the implementation.
- The URL is resolved from the app document, never from the client, and is restricted to the app's own hosts, so this cannot be used to probe arbitrary addresses.
get_vps_diagnose_report
Get VPS Diagnose Report
Returns the last stored Auto Diagnose report for the server, or null. It is read only: it reads the report already saved on the app document, with no SSH and no file access of its own.
Availability: API key
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
app_id |
string | Yes | The VPS or app whose stored Auto Diagnose report to return. |
Notes
- Microservice
app_module. Clearanceuser, owner-gated. Not private. Nomin_plan. Not a job, not cached. - The report itself is produced by a daily sweep, not by this call. Auto Diagnose is a paid add-on on the VPS, billed monthly plus metered AI credits per run.
turn_app_on
Turn App On
Turns on (resumes) the specified application. For a VPS this powers the machine back on.
Availability: API key
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
app_id |
string | Yes | Unique identifier of the application this request targets. |
Notes
- Microservice
app_module. Clearanceadmin. Not private. Nomin_plan. - Runs as a job with the title "Turn on app".
- On a farm VM the action is translated to the hypervisor's
start. After a resize, the guest filesystem grows on this next boot.
turn_app_off
Turn App Off
Turns off (suspends) the specified application. Xuda attempts a graceful shutdown first and then a forced one.
Availability: API key
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
app_id |
string | Yes | Unique identifier of the application this request targets. |
Notes
- Microservice
app_module. Clearanceadmin. Not private. Nomin_plan. - Job steps: "connecting to server", "turning off server".
- A powered-off server keeps billing. Data and IP address are retained and disk, CPU and RAM stay reserved, which is what you are paying for. Only
destroy_appstops the charge. - For data integrity, run a clean shutdown inside the guest before calling this.
reboot_server
Reboot Server
Power-cycles the server backing the given app: a hard reset, for when a graceful off and on is not possible. On farm VMs the action is translated to the hypervisor's reset.
Availability: Dashboard session
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
app_id |
string | Yes | Unique identifier of the application this request targets. |
Notes
- Clearance
admin.private: true, so an API key cannot call it. Nomin_plan.security: true,broadcast: true. - This is an immediate hard reset, equivalent to pulling the power. Prefer
turn_app_offfollowed byturn_app_onwhenever the machine still responds.
resize_server
Resize Server
Resizes the application's hosting server to the requested server type. On a farm box it derives the VM spec from the chosen slug, applies it in place, and re-keys the cost ledger off that slug, so the farm and DigitalOcean price identically. On a DigitalOcean droplet it requires the app to be powered off and issues a provider resize.
Availability: Dashboard session
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
app_hosting.app_server_type |
string | No | Value for the app hosting app server type field. |
app_server_type |
string | No | The new server slug. Read first by the implementation for farm resizes. Not declared in the method contract. |
farm_spec |
object | No | Legacy free-form {tier, cores, ram_gb, disk_gb}, still honored for back-compat. Not declared in the method contract. |
app_id |
string | Yes | The server to resize. Not declared in the method contract but required by the implementation. |
Notes
- Microservice
app_module. Clearanceadmin.private: true, so an API key cannot call it. Nomin_plan.security: true,broadcast: true. - The machine must be off. A resize on a running farm VM is refused with "Your server is still running. Turn it off from the Power screen, then resize. This protects your data: the disk cannot be grown safely while the system is using it."
- Disk grows only, never shrinks. A slug with a smaller disk than the current one is rejected. CPU and RAM may go either way.
- The farm resize takes a lock and reports four real stages: "checking your server is off", "applying CPU and memory", "growing the disk to N GB", "updating your plan". The declared job steps for the method are "initiating process", "applying new settings", "verifying installation", "rebooting server", "activating the server".
- The server does not come back on by itself. Call
turn_app_onwhen the resize finishes; the guest filesystem grows on that boot. - The resize stays in the region the server is already in. Moving a server between regions is not built.
- A resize closes the current billing segment and opens a new one at the new price, so the change prorates from the moment it applied.
reinstall_datacenter_resources
Reinstall Datacenter Resources
Reinstalls the hosting resources for a datacenter app. It is destructive, so it uses a two-step verification: call it with no validation_code and a code is emailed to the owner, then call it again with that code to actually run.
Availability: Dashboard session
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
app_id |
string | Yes | Unique identifier of the application this request targets. |
validation_code |
string | No | The emailed 4-digit code. Omit it to receive the code; supply it to execute. Not declared in the method contract. |
Notes
- Clearance
admin.private: true, so an API key cannot call it. Nomin_plan.security: true,broadcast: true. - The first call returns
code: 2, meaning "a code was emailed, call again with it". - Job steps: "initiating process", "connecting to server", "initiating directories", "creating self signed certificate", "creating ini files", "creating admin ini files", "creating db", "copying data", "creating design docs", "activating the server".
validate_destroy_app
Validate Destroy App
Validates whether the specified application can be permanently deleted. Call it before showing a destroy confirmation.
Availability: Dashboard session
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
app_id |
string | Yes | Unique identifier of the application this request targets. |
Notes
- Microservice
app_module. Clearanceadmin.private: true, so an API key cannot call it. Nomin_plan.is_async: true,broadcast: true.
destroy_app
Destroy App
Permanently deletes the specified application, which for a VPS means destroying the virtual machine and ending billing. This is the only way to stop paying for a server.
Availability: API key
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
app_id |
string | Yes | Unique identifier of the application to permanently delete. |
Notes
- Microservice
app_module. Clearanceadmin. Not private, so an API key can destroy a server. Treat that as a real risk when you issue keys. Nomin_plan.is_async: true,enforce_usage: true. - A pre-destroy hook stamps the termination timestamp on the cost ledger synchronously before the destruction job is queued, so the billing view updates instantly.
- Time already run is still billed. A server destroyed mid-cycle still appears on the upcoming invoice for the hours it existed.
- This is not reversible. Take a backup first if you want the data.
create_backup
Create Backup
Creates a backup application by replicating the source app. On a farm VPS this triggers a hypervisor image dump into the Proxmox Backup Server datastore, and the resulting backup is its own app document.
Availability: API key
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
data.app_replicate |
string | Yes | Unique identifier of the source application to replicate into a backup. |
Notes
- Microservice
backup_module. Clearanceadmin. Not private. Nomin_plan. - Job steps: "Initiate backup", "Perform backup". The real percentage is read from the hypervisor task log into the job bar.
- A manual backup does not require the automatic-backup add-on, but stored backup volume is billed per GB per month either way.
get_app_backups
Get App Backups
Retrieves the application's backups, newest first, with name, creation date, document count, size and status. It also opportunistically finalizes any backup whose provider task has since completed.
Availability: API key
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
app_id |
string | Yes | Unique identifier of the application this request targets. |
Notes
- Microservice
backup_module. Clearanceadmin. Not private. Nomin_plan. Not a job. - Because it finalizes completed tasks as a side effect, a backup that shows as still running will often settle simply by calling this again.
enable_auto_backup
Enable Auto Backup
Turns automatic backups on for the server. On first enable it seeds a schedule with all seven weekdays on and a retention of 4 copies.
Availability: Dashboard session
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
app_id |
string | Yes | Unique identifier of the application this request targets. |
Notes
- Microservice
backup_module. Clearanceadmin.private: true, so an API key cannot call it. Nomin_plan.security: true,broadcast: true. - The call is refused for an inactive account, and refused for project-type apps on the Free plan. A VPS is not blocked by that Free-plan rule.
- Enabling opens a new billing segment, so the monthly add-on prorates from exactly the moment it was switched on. Stored backup volume is billed separately per GB.
- Scheduled backups run after 22:00 UTC on the weekdays in the schedule. There is no catch-up run on a day that is not ticked.
disable_auto_backup
Disable Auto Backup
Turns automatic backups off. It closes the "backups on" billing segment and opens a clean one without the add-on, so the charge stops from exactly this moment and the days it did run are still billed.
Availability: Dashboard session
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
app_id |
string | Yes | Unique identifier of the application this request targets. |
Notes
- Microservice
backup_module. Clearanceadmin.private: true, so an API key cannot call it. Nomin_plan.security: true,broadcast: true. - Disabling the schedule does not delete the backups you already have. Delete those with
destroy_backup.
update_auto_backup_preferences
Update Auto Backup Preferences
Sets which weekdays automatic backups run on and how many copies to keep.
Availability: Dashboard session
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
app_id |
string | Yes | Unique identifier of the application this request targets. |
schedule |
object | Yes | Weekday schedule object with a boolean per day (sunday through saturday) controlling when auto backups run. |
copies |
object | Yes | Retention object whose number_of_copies sets how many backup copies to keep (1 to 30). |
Notes
- Microservice
backup_module. Clearanceadmin.private: true, so an API key cannot call it. Nomin_plan.security: true,broadcast: true. - Validation: the schedule must be a boolean per weekday with at least one day enabled, and the retention must be an integer between 1 and 30. Anything else is rejected with a specific message.
- The call is also refused for an inactive account.
- Copies beyond the retention number are pruned oldest first after each scheduled run.
restore_backup
Restore Backup
Restores a backup app, either replacing the source application in place or provisioning a brand-new one, depending on restore_type.
Availability: Dashboard session
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
app_id |
string | Yes | Unique identifier of the backup application to restore from. |
data.restore_type |
string | Yes | Restore mode: restore_replace to overwrite the source app, or restore_new to provision a new app. |
Notes
- Microservice
backup_module. Clearanceadmin.private: true, so an API key cannot call it. Nomin_plan.security: true,broadcast: true. - The
app_idhere is the backup's own id, not the server's. - On the farm,
restore_newbuilds a fresh VM with its own id, address and cloud-init identity rather than overwriting anything, and a restored Full Stack VPS is re-keyed so it does not drive the source box's project database. restore_replaceoverwrites the source server. It is not reversible.
destroy_backup
Destroy Backup
Permanently deletes a backup.
Availability: Dashboard session
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
backup_id |
string | Yes | Value for the backup id field. |
Notes
- Microservice
app_module. Clearanceadmin.private: true, so an API key cannot call it. Nomin_plan.is_async: true,security: true,enforce_usage: true,broadcast: true. - Deleting backups is also what stops the per-GB stored-backup charge for them.
farm_volume_create
Farm Volume Create
Creates a customer block-storage volume on the Xuda farm and registers it on the app. The hypervisor allocates a raw image on the configured storage and returns its volume id, the volume is recorded on the app document, and the per-GB charge is added to the server's bill.
Availability: Dashboard session
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
app_id |
string | Yes | The farm server to create the volume for. |
size_gb |
number | Yes | Size in GB. Minimum 1; values below 1 are clamped up. |
name |
string | No | Display name. Defaults to volume-{size}gb. |
Notes
- Clearance
user.private: true, so an API key cannot call it. Nomin_plan. Not a job. - The fields are not declared in the method contract; the list above is read from the implementation.
- Farm servers only. Block storage is separate from, and on top of, the machine's own disk.
- The farm block-storage backend is configured by a mount setting that is empty in the shipped configuration, and while it is empty every
farm_volume_*mutation answers "block storage not configured". Check the storage panel on your own server before building against these six methods.
farm_volume_attach
Farm Volume Attach
Attaches a farm block-storage volume to its app's virtual machine, picking the next free SCSI slot from the live VM configuration automatically and recording that slot on the volume.
Availability: Dashboard session
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
app_id |
string | Yes | The farm server the volume belongs to. |
volume_id |
string | Yes | The volume id returned by farm_volume_create. |
Notes
- Clearance
user.private: true, so an API key cannot call it. Nomin_plan. Not a job. - The fields are not declared in the method contract; the list above is read from the implementation.
- You do not choose the slot. Attaching a volume presents a new raw block device inside the guest, which you then partition and mount yourself.
farm_volume_detach
Farm Volume Detach
Detaches a farm block-storage volume from its app's virtual machine. The volume and its data survive; only the attachment is removed.
Availability: Dashboard session
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
app_id |
string | Yes | The farm server the volume belongs to. |
volume_id |
string | Yes | The volume to detach. Must currently be attached. |
Notes
- Clearance
user.private: true, so an API key cannot call it. Nomin_plan. Not a job. - The fields are not declared in the method contract; the list above is read from the implementation.
- Unmount the device inside the guest first. Detaching a mounted filesystem risks the data on it.
- Detaching does not stop the charge. A detached volume still exists and is still billed until it is deleted.
farm_volume_resize
Farm Volume Resize
Grows a farm block-storage volume.
Availability: Dashboard session
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
app_id |
string | Yes | The farm server the volume belongs to. |
volume_id |
string | Yes | The volume to grow. |
size_gb |
number | Yes | New size in GB. Cannot be smaller than the current size. |
Notes
- Clearance
user.private: true, so an API key cannot call it. Nomin_plan. Not a job. - The fields are not declared in the method contract; the list above is read from the implementation.
- Grow only. A requested size smaller than the current one is clamped back up to the current size rather than rejected, so check what came back before assuming a shrink happened.
- The per-GB charge is recalculated onto the server's bill on every resize.
farm_volume_delete
Farm Volume Delete
Deletes a farm block-storage volume and releases its storage. If it is still attached it is detached first.
Availability: Dashboard session
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
app_id |
string | Yes | The farm server the volume belongs to. |
volume_id |
string | Yes | The volume to delete. |
Notes
- Clearance
user.private: true, so an API key cannot call it. Nomin_plan. Not a job. - The fields are not declared in the method contract; the list above is read from the implementation.
- The data goes with it, and the per-GB charge is removed from the server's bill.
farm_volume_list
Farm Volume List
Lists an app's farm block-storage volumes as recorded on the app document, each with its volume id, name, size in GB, attached flag, attach slot and creation timestamp.
Availability: Dashboard session
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
app_id |
string | Yes | The server whose volumes to list. |
Notes
- Clearance
user.private: true, so an API key cannot call it. Nomin_plan. Not a job. - The fields are not declared in the method contract; the parameter above is read from the implementation.
- This reads the app document, so it reflects what Xuda recorded rather than a live hypervisor query.
get_app_ipv4_availability
Get App IPv4 Availability
Returns the dedicated public-IPv4 picture for a farm server: maximum quota, used, available, the pool versus bank breakdown, an unlimited flag, whether one is orderable for this box, the monthly add-on price, the one-time setup price, whether the setup fee has already been paid, whether the add-on is currently enabled, the node's region, and whether the node supports IPv6.
Availability: Dashboard session
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
app_id |
string | Yes | The farm server to report on. Also accepted as data.app_id. |
Notes
- Clearance
user.private: true, so an API key cannot call it. Nomin_plan. Not a job. - The fields are not declared in the method contract; the parameter above is read from the implementation.
- The response also carries a
portableblock describing the separate portable-IPv4 product, which is currentlystatus: 'coming_soon'and is not orderable. - Call this before
farm_enable_dedicated_ipto find out whether enabling would succeed, what it would cost, and whether the setup fee has already been paid on this app.
farm_enable_dedicated_ip
Farm Enable Dedicated IP
Turns on the dedicated public-IPv4 add-on for a farm VPS and reprices the plan. There is no server-size minimum: the only limit is real IPv4 capacity on the node.
Availability: Dashboard session
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
app_id |
string | Yes | The farm VPS to add the dedicated IPv4 to. |
Notes
- Clearance
user.private: true, so an API key cannot call it. Nomin_plan. Not a job. - The fields are not declared in the method contract; the parameter above is read from the implementation.
- Billing follows the bind, not the request. When the node has a free banked provider address, Xuda binds it end to end (guest NIC hotplug plus a host route) before billing, so a failed bind blocks the enable and never produces a charge for an address that did not land. A failed bind answers "We could not set up the dedicated IP on this server right now."
- Idempotent. Enabling an already-enabled IP returns
{ already: true }and does not charge again. - The one-time setup fee is charged once per app ever, even across a disable and re-enable cycle.
- When the pool is exhausted it returns
error: 'pool_exhausted'with the alternatives available: order one throughrequest_dedicated_ip, pick another region, or use the free managed domain. - Requesting a dedicated IP at deploy time can change where the server is built, because placement is then resolved against nodes that have free IPv4 capacity.
- Note on price: the billed monthly rate for this add-on is 2.50 USD plus a one-time 10 USD setup fee. The deploy wizard currently labels the add-on 2 USD and adds 2 to its running total, which is a display bug in that screen and not a second price.
farm_disable_dedicated_ip
Farm Disable Dedicated IP
Removes the dedicated public-IPv4 add-on from a farm VPS and reprices the plan without it.
Availability: Dashboard session
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
app_id |
string | Yes | The farm VPS to remove the dedicated IPv4 add-on from. |
Notes
- Clearance
user.private: true, so an API key cannot call it. Nomin_plan. Not a job. - The fields are not declared in the method contract; the parameter above is read from the implementation.
- Idempotent.
- The one-time setup fee is not refunded, and it is not charged again if the IP is later re-enabled on the same app.
- The server keeps its free
*.xuda.appweb address and its IPv6, where the node supports it. Anything pinned to the dedicated address will stop resolving there.
request_dedicated_ip
Request Dedicated IP
When no dedicated IPv4 is free on the server's box right now, this lets the customer ask for one. It emails Xuda operations with the app, the owner, the region, the box host and the exact provider panel to order from, then stamps the app document so a double tap does not email twice.
Availability: Dashboard session
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
app_id |
string | Yes | The farm server to request an address for. Also accepted as data.app_id. |
Notes
- Clearance
user.private: true, so an API key cannot call it. Nomin_plan. Not a job. - The fields are not declared in the method contract; the parameter above is read from the implementation.
- No billing happens here. The charge only lands when the address is later enabled with
farm_enable_dedicated_ip. - De-duplicated for 12 hours. A repeat request inside that window does not email operations again.
- The success reply is "Thanks. We will set up a dedicated IPv4 for this server and email you when it is ready."
- If the box has no provider host an address can be ordered from, the call returns
error: 'not_orderable'and points at a free custom domain or a different region instead.
farm_detect_node_ipv6
Farm Detect Node IPv6
Reads the network configuration of the node hosting the caller's app and derives its routed IPv6 /64, optionally caching it on the node so every later VPS on that host gets a public IPv6. It also returns the raw IPv6 interfaces, so "this host routes no IPv6" is distinguishable from a parse failure.
Availability: Dashboard session
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
app_id |
string | Yes | An app on the node to inspect. |
save |
boolean | No | When true, cache the derived prefix on the node document. |
Notes
- Clearance
user.private: true, so an API key cannot call it. Nomin_plan. Not a job. - The fields are not declared in the method contract; the list above is read from the implementation.
- It is scoped to the caller's own app and therefore to that app's node. It cannot be pointed at arbitrary infrastructure.
get_app_firewall
Get App Firewall
Retrieves the application's firewall configuration.
Availability: API key
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
app_id |
string | Yes | Unique identifier of the application this request targets. |
Notes
- Microservice
app_module. Clearanceadmin. Not private. Nomin_plan. Not a job. - Every farm VM is modeled in the fleet firewall at create time, so this returns a real rule set from the moment the server exists.
configure_app_firewall
Configure App Firewall
Updates the application's firewall configuration, meaning the inbound rules for the server.
Availability: Dashboard session
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
app_id |
string | Yes | Unique identifier of the application this request targets. |
Notes
- Microservice
app_module. Clearanceadmin.private: true, so an API key cannot call it. Nomin_plan.security: true,broadcast: true. - Reading the firewall is API-key reachable through
get_app_firewall; changing it is not. Automating rule changes from outside the dashboard is not supported today.
get_ssh_keys
Get Ssh Keys
Retrieves the account's stored SSH public keys.
Availability: Dashboard session
Parameters
This method takes no parameters. No fields are declared; the account is taken from the session.
Notes
- Microservice
account_module. Clearanceuser.private: true, so an API key cannot call it. Nomin_plan. Not a job.
save_ssh_key
Save Ssh Key
Validates and stores an SSH public key on the account, with an optional expiry and an on/off switch.
Availability: Dashboard session
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
ssh_key_name |
string | Yes | Display label for the SSH public key. |
ssh_key_content |
string | Yes | The SSH public key string to validate and store. |
expires_at |
number | No | Optional expiry in epoch milliseconds. Null or 0 clears the expiry. |
enabled |
boolean | No | On/off switch. Off means the key cannot be assigned to servers. |
Notes
- Microservice
account_module. Clearanceuser.private: true, so an API key cannot call it. Nomin_plan. - Saving a key stores it on the account. It does not put it on any server. Call
assign_ssh_keysper server for that. - After the expiry moment the key is refused on assign and is automatically removed from every server it is on.
set_ssh_key_enabled
Set SSH Key Enabled
On and off switch for an SSH key.
Availability: Dashboard session
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
ssh_key_id |
string | Yes | Identifier of the SSH key document. |
enabled |
boolean | Yes | true = on, false = off (removes the key from every server). |
Notes
- Microservice
account_module. Clearanceuser.private: true, so an API key cannot call it. Nomin_plan. Not a job. - Switching a key off also removes it from every server it is installed on, so access stops immediately. This is the fast way to cut off a departing teammate.
- Switching it back on does not reinstall it anywhere. Re-assign it per server.
delete_ssh_key
Delete Ssh Key
Soft-deletes an SSH key from the account.
Availability: Dashboard session
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
ssh_key_id |
string | Yes | Identifier of the SSH key document to soft-delete. |
Notes
- Microservice
account_module. Clearanceuser.private: true, so an API key cannot call it. Nomin_plan.
assign_ssh_keys
Assign SSH Keys
Installs the given SSH public keys on a deployment, datacenter, VPS or webserver.
Availability: Dashboard session
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
app_id |
string | Yes | Unique identifier of the target deployment or server app to assign the SSH keys to. |
ssh_keys |
array | Yes | Array of SSH key document IDs whose public keys are copied onto the server. |
Notes
- Clearance
admin.private: true, so an API key cannot call it. Nomin_plan. - Farm VMs are written over the hypervisor's guest-agent channel, which needs no in-guest credential. That is what makes this work on a customer VPS the platform holds no standing login on. Other servers use
ssh-copy-id. - If the guest agent is missing on a farm VM, Xuda installs it and retries once.
- A key that is switched off or past its expiry is refused with an explanatory message naming the key, rather than being silently skipped: "key "{name}" is switched off. Turn it on in Settings, then assign it." or "key "{name}" expired on {date}. Extend or remove its expiry, then assign it."
revoke_ssh_keys
Revoke SSH Keys
Removes the given SSH public keys from the server, the exact reverse of assign_ssh_keys.
Availability: Dashboard session
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
app_id |
string | Yes | Unique identifier of the target server app to remove the SSH keys from. |
ssh_keys |
array | Yes | Array of SSH key document IDs whose public keys are removed from the server. |
Notes
- Clearance
admin.private: true, so an API key cannot call it. Nomin_plan. - Farm VMs are edited over the guest-agent channel, other servers over SSH.
- Only the listed keys are removed. Every other key on the machine survives, including keys you put there yourself.
get_ssh_key_events
Get SSH Key Events
The account's SSH access log: every key grant, revoke, on and off flip, expiry and delete, newest first.
Availability: Dashboard session
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
ssh_key_id |
string | No | Optional filter to one key. |
app_id |
string | No | Optional filter to one server. |
limit |
number | No | Max rows, default 200, cap 1000. |
Notes
- Microservice
account_module. Clearanceuser.private: true, so an API key cannot call it. Nomin_plan. Not a job.
publish_templates
Publish Farm Templates
Ensures every live farm placement node carries the golden deployment and datacenter templates, copying any missing one from a node that already has it. This is a fleet operations tool, not a customer action.
Availability: Operator only
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
dry_run |
(not typed in the method contract) | No | Only report which nodes are missing a golden template; do not copy anything. |
Notes
- Clearance
admin. It is not marked private, so it is not excluded from the API-key catalog, but it acts on Xuda's own fleet nodes rather than on any customer app and there is nothing in it for an account. Nomin_plan.job: true, not cached,mcp: false.
digitalocean_webhook
DigitalOcean Webhook
The first-boot callback a newly provisioned DigitalOcean droplet curls from its cloud-init. It validates the droplet, updates the app document with the droplet information, and installs the hosting resources. It is a provider integration endpoint, not a call you make.
Availability: Public endpoint
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
id |
string | Yes | App identifier of the DigitalOcean droplet to validate and provision, read from the request query. |
Notes
- Clearance
public, reached asGET /cpi/digitalocean_webhook?id={app_id}.private: true, so it is excluded from the API-key catalog. Nomin_plan. - On the farm there is no equivalent inbound webhook you can call: production VMs self-trigger the same install from a first-boot service on the machine.
Server Slugs
app_server_type on deploy_vps, deploy_webserver and resize_server takes one of these 17 VPS slugs. They are the server_group: 'vps' slice of the platform catalog you can read in full from get_price_obj.
| Slug | Family | vCPU | RAM (GB) | Disk (GB) | USD / month |
|---|---|---|---|---|---|
shared_vps_05 |
shared | 1 | 0.5 | 10 | 2.50 |
shared_vps_1 |
shared | 1 | 1 | 25 | 4 |
shared_vps_2 |
shared | 2 | 2 | 60 | 16 |
shared_vps_4 |
shared | 4 | 8 | 160 | 46 |
shared_vps_8 |
shared | 8 | 16 | 320 | 94 |
optimized_vps_2 |
optimized | 2 | 8 | 50 | 66 |
optimized_vps_4 |
optimized | 4 | 16 | 100 | 134 |
optimized_vps_8 |
optimized | 8 | 32 | 200 | 270 |
optimized_vps_16 |
optimized | 16 | 64 | 400 | 542 |
performance_vps_4 |
performance | 4 | 32 | 100 | 166 |
performance_vps_16 |
performance | 16 | 128 | 400 | 670 |
performance_vps_24 |
performance | 24 | 192 | 600 | 1006 |
performance_vps_32 |
performance | 32 | 256 | 800 | 1342 |
large_vps_8 |
large | 8 | 64 | 1800 | 650 |
large_vps_16 |
large | 16 | 128 | 3600 | 1302 |
large_vps_24 |
large | 24 | 192 | 5400 | 1954 |
large_vps_32 |
large | 32 | 256 | 7200 | 2606 |
deploy_datacenter uses the deployment group (shared_hosting_1 through large_hosting_32) instead, and deploy_full_stack_vps is offered from the managed group with the smallest shared boxes removed, because a shared type is refused server-side for that flow.
Regions. data.app_region is one of five macro regions: na, latam, emea, apac, africa. Behind them sit 15 named metro codes, spread across na (ash, hil, sea, nyc, sfo, tor), apac (sin, blr, syd) and emea (hel, fsn, nbg, ams, lon, fra). latam and africa currently have no farm metros at all, so both resolve to unavailable. The legacy DigitalOcean slug list is still what the method contract declares as the option set for data.app_region, so do not generate client validation from that field list.
Plan Gates
Membership plan gating is a plain rank comparison. Free is rank 0, Pro is rank 1, Team rank 2, Agency rank 3 and Enterprise rank 4 and above. A refusal reads "Upgrade to {Plan} or higher to use it."
| Method | min_plan | Plan rank required |
|---|---|---|
deploy_datacenter |
pro |
1 |
deploy_another |
pro |
1 |
Every other method in this reference carries no min_plan. In particular deploy_vps and deploy_full_stack_vps do not, so any signed-in account, including Free, can create a VPS. There is no free VPS, though: every slug has a price and the cheapest is 2.50 USD per month.
Automatic backups have no min_plan either, but enable_auto_backup refuses project-type apps on the Free plan. That rule does not apply to a VPS.
Errors
This product does not publish a single numeric error table the way a token-verification API does. Failures arrive in three shapes, and you should handle all three.
Numeric codes on the CPI envelope:
| Code | Where | Meaning |
|---|---|---|
-91 |
get_app_server_usage |
Metrics are refused on an external VPS whose owner has not granted the metrics access scope. |
2 |
reinstall_datacenter_resources |
Not a failure. A validation code was emailed to the owner; call again with validation_code. |
Structured refusals returned as an error or reason string:
| Value | Where | Meaning |
|---|---|---|
no_farm_region |
get_region_hosting_options |
The macro region has no farm metros at all. latam and africa are in this state today. |
farm_disabled |
get_farm_availability |
Farm placement is switched off, which is different from being full. |
node_unreachable |
get_farm_availability |
The candidate node did not answer, so capacity is unknown. |
no_capacity |
get_farm_availability |
Real free cores, RAM or disk are insufficient for the request. |
pool_exhausted |
farm_enable_dedicated_ip |
No free IPv4 on this node. The response carries the alternatives: order one, another region, or a managed domain. |
not_orderable |
request_dedicated_ip |
This box has no provider host an address can be ordered from. |
Readable message strings, returned to the caller as written and safe to show a user:
- "Service temporarily unavailable, please try again later." A farm-opted deploy found no capacity. Automatic failover to another cloud is switched off deliberately, so this is a real refusal, not a retryable transient in disguise. Choose a different region or a smaller size.
- "This region is not available for deployment. Please choose a different region." The legacy DigitalOcean path on an unusable region.
- "xuda Farm is not available in {region} yet." The region has no farm metros.
- "Your server is still running. Turn it off from the Power screen, then resize. This protects your data: the disk cannot be grown safely while the system is using it."
- "Disk can only grow, pick a size with at least {N} GB disk."
- "We could not set up the dedicated IP on this server right now." The IPv4 bind failed, and nothing was billed.
- "block storage not configured." The farm block-storage backend is unset, so
farm_volume_*mutations cannot run. - "key "{name}" is switched off. Turn it on in Settings, then assign it."
- "key "{name}" expired on {date}. Extend or remove its expiry, then assign it."
- "Upgrade to {Plan} or higher to use it." The membership plan gate on
deploy_datacenterordeploy_another.
Rate Limits, Cool-downs And Quotas
There is no per-method request rate limit published for this product. What does constrain you is the following.
| Limit | Value |
|---|---|
| Dedicated IPv4 request cool-down | One operations email per app per 12 hours. Repeat calls inside the window are absorbed. |
| Backup retention | 1 to 30 copies, validated server-side. Defaults to 4 on first enable. |
| Backup schedule | After 22:00 UTC on ticked weekdays only. No catch-up run on an unticked day, and a day that already has a backup is skipped. |
| Backup scheduler poll | Every 5 minutes, so an edited schedule or a missed slot self-heals within that window. |
| Farm capacity refresh | Every 5 minutes from the live hypervisor. Availability and price you read are at most that stale. |
| Placement headroom | A node must hold 20 percent more free capacity than the VM needs before it is offered. |
| vCPU overcommit budget | 8x physical cores per node, used for placement math. |
| Node capacity alert | Latched at 80 percent, which is an internal operations alert rather than a customer-visible cap. |
get_ssh_key_events rows |
Default 200, hard cap 1000. |
| Minimum block-storage volume | 1 GB. Smaller values are clamped up. |
| Minimum billable segment | 1 hour. A create-and-destroy inside the hour still pays an hour. |
Idempotency And Repeat Calls
farm_enable_dedicated_ipis idempotent. A second enable on an already-enabled server returns{ already: true }and does not charge again.farm_disable_dedicated_ipis idempotent the same way.- The IPv4 setup fee is once per app, ever. Disabling and re-enabling the add-on on the same server does not produce a second setup fee.
request_dedicated_ipis de-duplicated for 12 hours by a stamp on the app document, so a double tap does not email operations twice.farm_volume_resizeclamps rather than rejects. A size below the current one comes back as the current one. Read the response instead of assuming the request applied verbatim.- A scheduled backup skips a day that already has one, so a re-poll inside the same slot does not produce duplicates.
- Usage line items are updated in place, not appended. Deployment usage is written onto the customer's upcoming invoice with metadata carrying
type: 'deployment_usage'and theapp_id, and that metadata is what makes a repeated flush an update rather than a second charge. - Enable and disable calls open and close billing segments rather than toggling a boolean, so the ledger stays correct even under repeated flips: you pay for exactly the time each add-on was on.
- Nothing here is destructive-safe by default.
destroy_app,destroy_backupandrestore_backupwithrestore_replaceare one-way. Gate them behindvalidate_destroy_appand your own confirmation.
Billing Behavior You Should Build Around
Hosting is metered hourly against a monthly catalog price. The monthly figure is divided by 730.5 hours to get the hourly rate, with a one-hour minimum per pricing segment. Every spec change or add-on change closes the current segment and opens a new one, so a mid-cycle resize, an enabled backup schedule or an added volume prorates exactly.
| Add-on | Price | Applies to |
|---|---|---|
| Automatic backups | 10 USD per month plus 0.05 USD per GB stored | The monthly fee is a prorated segment; stored volume is billed separately. |
| Dedicated public IPv4 | 2.50 USD per month plus a one-time 10 USD setup fee | Farm servers, setup fee once per app ever. |
| Block storage volume | 0.10 USD per GB per month | Farm servers, on top of the machine's own disk. |
| Auto Diagnose | 5 USD per month plus metered AI credits per run | VPS only. |
Two consequences worth designing for: a powered-off server still bills, and a server destroyed mid-cycle is still billed for the hours it ran.
Webhooks
This product exposes one inbound webhook and consumes one from Stripe.
| Webhook | Direction | What it does |
|---|---|---|
digitalocean_webhook (GET /cpi/digitalocean_webhook?id={app_id}) |
Inbound to Xuda | The first-boot callback a new DigitalOcean droplet curls from its own cloud-init to trigger the hosting-resource install. On the farm the equivalent step is a first-boot service on the VM, with no inbound HTTP call. |
Stripe invoice.upcoming |
Inbound to Xuda | Triggers the deployment usage flush that writes per-deployment line items onto the customer's upcoming invoice, roughly 7 days before it closes. |
There is no outbound webhook you can subscribe to. Cloud Hosting does not call your endpoint when a server finishes provisioning, finishes a resize, completes a backup or changes state. Progress is reported through the job that the originating call created, and state is readable from get_deploy_info and get_account_vps. If you are automating from outside the dashboard, poll.
Scheduled Work Behind The API
These run on Xuda's side and change data you can read, so they are worth knowing about even though you cannot call them.
| Job | Cadence |
|---|---|
| Farm capacity reconciliation | Every 5 minutes, from the live hypervisor. |
| Farm node health check | Daily, by default at 08:15. |
| Automatic backups | Re-polled every 5 minutes, firing the day's backups after the 22:00 UTC slot, then pruning to the retained copy count. |
| Auto Diagnose sweep | Daily, by default at 09:45. Its output is what get_vps_diagnose_report reads. |
| SSH key expiry sweep | Removes expired keys from every server they are installed on. |
Known Limits Of This Surface Today
Stated plainly so you do not build against something that is not there:
- The farm is effectively the only backend. Automatic failover to DigitalOcean is switched off, so a request with no farm capacity is refused rather than served elsewhere. The DigitalOcean methods in this reference describe a legacy path.
- Two of the five macro regions have no capacity.
latamandafricaresolve to unavailable. - Region migration is not built.
resize_serverchanges CPU, RAM and disk in the region the server is already in. Usedeploy_anotherto build in a different region. - Farm block storage is gated on a mount setting that ships empty, and while it is empty the six
farm_volume_*mutations answer "block storage not configured". - Portable IPv4 is not orderable. The
portableblock onget_app_ipv4_availabilityreportsstatus: 'coming_soon'. managed_vpsis not reachable. The app type exists with its own tabs, but its create flow is not exposed and no create method for it is published in the method contract.- Firewall changes, provisioning, resize and backup scheduling are all dashboard-session only. An external API key can read a server, meter it, power it, back it up and destroy it, but it cannot create one or change its shape.
A Note On The Rest Of The Surface
The dashboard's Files tab, its in-browser console and its Domain tab are driven by CPI methods that live in app_module rather than in the hosting modules: the vps_fs_* family for the file browser, the vps_ssh_access_* family for terminal access, and the site hostname methods for custom domains. They are documented with their own products, not here.
Other deploy_* methods you will see in the same module belong elsewhere too. deploy_spa, deploy_mpa, deploy_pwa, deploy_embed, deploy_api, deploy_cron, deploy_emitter, deploy_preview, deploy_user_group, deploy_mini_app, deploy_marketplace, deploy_instance, update_app_version and the reinstall_*_resources variants belong to the Development Platform deployment product. deploy_load_balancer, get_load_balancer_overview and update_load_balancer_backends belong to Load Balancer. create_external_vps and verify_external_vps_ssh belong to External VPS. Each has its own landing page and its own reference.