# compute-api ## Pages - [EZGH Compute API](https://docs.ezghcloud.com/compute-api/index.md) — Instances (virtual machines), autoscaling groups, SSH keys and the project's compute settings. Every path is under an organization; lists are paged with limit, cursor and nextCursor. Each organization lists the instance types it may launch at GET /v1/organizations/{orgId}/instance-types. - [Attach a network interface to a stopped instance](https://docs.ezghcloud.com/compute-api/AttachNetworkInterface/index.md) — Synchronous. The instance must be stopped; the interface must be available and in the instance's project. It keeps its firewalls. - [Attach a volume to an instance](https://docs.ezghcloud.com/compute-api/AttachVolume/index.md) — On a stopped instance it's synchronous: the volume takes the instance's next free volume slot and the guest sees it at the next start. The volume must be available and in the instance's project. On a running instance it's asynchronous: 202 with an AttachVolume operation, and the guest sees the disk once it succeeds (409 instance_restart_required until the instance is stopped and started once; 503 actions_unavailable while its control plane is unavailable). Attaching a volume that's already attached answers 200, or 202 with the attach's open operation. - [Stop the release in progress](https://docs.ezghcloud.com/compute-api/CancelAutoscalingGroupRelease/index.md) — Leaves a mixed group: the members the release launched for its current step are terminated, and the others keep serving. 409 no_release when none is in progress. - [Cancel an operation](https://docs.ezghcloud.com/compute-api/CancelOperation/index.md) — 409 operation_finished or operation_not_cancellable when it can't be cancelled. - [Create an autoscaling group](https://docs.ezghcloud.com/compute-api/CreateAutoscalingGroup/index.md) — Asynchronous: answers 202 with the CreateAutoscalingGroup operation. The writer needs the launch's permissions (compute.instances.create, the SSH keys, the Bot, and the network, firewall, block store and image actions) and, for a promql policy, obs.metrics.query on the project; 403 names the first denied. The image is resolved now and pinned. 503 unavailable (with Retry-After) while autoscaling is unavailable in the region; nothing is stored. - [Open a serial or VNC console session](https://docs.ezghcloud.com/compute-api/CreateConsoleSession/index.md) — The instance must be running (409 instance_not_running). serial needs compute.instances.connectSerialConsole, vnc compute.instances.connectVncConsole. Connect to url within 30 seconds with the WebSocket subprotocols ezgh.console.v1 and ticket.; the ticket redeems once and never goes in the URL. At most compute.consoleSessionsPerInstance sessions per instance at once (429 quota_exceeded). 503 actions_unavailable while the instance's cell can't act. - [Launch an instance](https://docs.ezghcloud.com/compute-api/CreateInstance/index.md) — Asynchronous: answers 202 with the CreateInstance operation once capacity is claimed and every volume, interface and firewall attachment is reserved. 409 insufficient_capacity when no cell has room. - [Delete an autoscaling group](https://docs.ezghcloud.com/compute-api/DeleteAutoscalingGroup/index.md) — Asynchronous: sets desired capacity to 0, terminates every member, then deletes the group. - [Delete an SSH key](https://docs.ezghcloud.com/compute-api/DeleteSshKey/index.md) — Instances keep the copy they launched with. - [Detach a network interface from a stopped instance](https://docs.ezghcloud.com/compute-api/DetachNetworkInterface/index.md) — Synchronous. The instance must be stopped. The primary interface can't be detached (409 primary_interface). - [Detach a volume from an instance](https://docs.ezghcloud.com/compute-api/DetachVolume/index.md) — On a stopped instance it's synchronous and the volume becomes available. The root volume can't be detached (409 root_volume). On a running instance it's asynchronous: 202 with a DetachVolume operation, which waits for the guest to release the disk; force frees the volume without the guest (the guest sees I/O errors on it and may lose writes it hadn't made). A repeat answers the open operation, and a repeat with force escalates it. 409 volume_detaching while a force-detached disk is still in the guest. - [Get an autoscaling group](https://docs.ezghcloud.com/compute-api/GetAutoscalingGroup/index.md) - [Get an instance's console output](https://docs.ezghcloud.com/compute-api/GetConsoleOutput/index.md) — The last 64 KiB of the instance's serial output, as last captured; readable whatever the instance's state. 404 console_output_unavailable when it has never produced any. - [Get an instance](https://docs.ezghcloud.com/compute-api/GetInstance/index.md) - [Get an instance type](https://docs.ezghcloud.com/compute-api/GetInstanceType/index.md) - [Get the project's observability setting](https://docs.ezghcloud.com/compute-api/GetObservabilitySettings/index.md) - [Get an operation (poll it until it finishes)](https://docs.ezghcloud.com/compute-api/GetOperation/index.md) — While it's queued or running, Retry-After suggests when to poll again. Not recorded in Trails. - [Get an SSH key](https://docs.ezghcloud.com/compute-api/GetSshKey/index.md) - [Import an SSH public key](https://docs.ezghcloud.com/compute-api/ImportSshKey/index.md) — Ed25519, ECDSA (P-256, P-384, P-521) or RSA of at least 2048 bits, as one OpenSSH line. 409 ssh_key_exists when the project has a key with the same fingerprint. - [List a group's activities, newest first](https://docs.ezghcloud.com/compute-api/ListAutoscalingGroupActivities/index.md) — Kept 30 days. - [List a group's members, oldest first](https://docs.ezghcloud.com/compute-api/ListAutoscalingGroupMembers/index.md) - [List a project's autoscaling groups, newest first](https://docs.ezghcloud.com/compute-api/ListAutoscalingGroups/index.md) - [List an instance's health events, newest first](https://docs.ezghcloud.com/compute-api/ListInstanceHealthEvents/index.md) — Status check transitions, guest panics, watchdog resets, volume I/O errors and crashes of the last 30 days. Needs compute.instances.get. - [List the instance types the organization can launch](https://docs.ezghcloud.com/compute-api/ListInstanceTypes/index.md) - [List a project's instances, newest first](https://docs.ezghcloud.com/compute-api/ListInstances/index.md) — Filters combine: status, instanceType, and tag.= for each tag that must match. - [List the organization's operations, newest first](https://docs.ezghcloud.com/compute-api/ListOperations/index.md) - [List a project's SSH keys, newest first](https://docs.ezghcloud.com/compute-api/ListSshKeys/index.md) - [Reboot a running instance](https://docs.ezghcloud.com/compute-api/RebootInstance/index.md) — Asynchronous. force resets it without asking the guest. 409 instance_not_running. - [Change an instance's type](https://docs.ezghcloud.com/compute-api/ResizeInstance/index.md) — Asynchronous. A running instance is restarted with the new type on its host or another one. 409 instance_store_root for an instance that boots from instance store. - [Start a stopped instance](https://docs.ezghcloud.com/compute-api/StartInstance/index.md) — Asynchronous. 409 instance_not_stopped, 409 insufficient_capacity when no cell has room. - [Stop a running instance](https://docs.ezghcloud.com/compute-api/StopInstance/index.md) — Asynchronous. force skips the guest's graceful shutdown. 409 instance_not_running; 503 actions_unavailable while the instance's control plane is unavailable. 409 instance_store_root for an instance that boots from instance store. - [Terminate a chosen member](https://docs.ezghcloud.com/compute-api/TerminateAutoscalingGroupMember/index.md) — The member drains from its target groups and is stopped and terminated, as on a scale-in. With decrementDesired true, desiredCapacity goes down by one with it (409 below_min_size at minSize); with false, the group launches a replacement. A member already terminating answers 200 unchanged. An instance that isn't a member of the group is 404. - [Terminate an instance](https://docs.ezghcloud.com/compute-api/TerminateInstance/index.md) — Asynchronous: answers 202 with the TerminateInstance operation. Billing stops at the 202. Always accepted, whatever the instance's state; an open operation on it is cancelled. - [Change a group's size, policies, timings or batch size](https://docs.ezghcloud.com/compute-api/UpdateAutoscalingGroup/index.md) — Synchronous. Never changes the launch spec: use PUT …/launch-spec. - [Replace a group's launch spec and start a release](https://docs.ezghcloud.com/compute-api/UpdateAutoscalingGroupLaunchSpec/index.md) — Asynchronous: answers 202 with the UpdateAutoscalingGroupLaunchSpec operation, which ends when the release does. The version moves on, the image is resolved again and pinned, and a release in progress is superseded (its operation ends cancelled). 409 operation_in_progress while the group is still being created. 503 unavailable (with Retry-After) while autoscaling is unavailable in the region; nothing changes. - [Rename or retag an instance, or change its Bot](https://docs.ezghcloud.com/compute-api/UpdateInstance/index.md) — Synchronous: only the fields given change. - [Send the project's instance metrics to EZGH Observability](https://docs.ezghcloud.com/compute-api/UpdateObservabilitySettings/index.md) — Enabling it also needs obs.metrics.ingest on the project. - [Rename or retag an SSH key](https://docs.ezghcloud.com/compute-api/UpdateSshKey/index.md) - [AutoscalingActivity](https://docs.ezghcloud.com/compute-api/schemas/AutoscalingActivity/index.md) - [AutoscalingActivityList](https://docs.ezghcloud.com/compute-api/schemas/AutoscalingActivityList/index.md) - [AutoscalingGroup](https://docs.ezghcloud.com/compute-api/schemas/AutoscalingGroup/index.md) - [AutoscalingGroupCreate](https://docs.ezghcloud.com/compute-api/schemas/AutoscalingGroupCreate/index.md) - [AutoscalingGroupList](https://docs.ezghcloud.com/compute-api/schemas/AutoscalingGroupList/index.md) - [AutoscalingGroupUpdate](https://docs.ezghcloud.com/compute-api/schemas/AutoscalingGroupUpdate/index.md) - [AutoscalingLaunchSpec](https://docs.ezghcloud.com/compute-api/schemas/AutoscalingLaunchSpec/index.md) - [AutoscalingMember](https://docs.ezghcloud.com/compute-api/schemas/AutoscalingMember/index.md) - [AutoscalingMemberList](https://docs.ezghcloud.com/compute-api/schemas/AutoscalingMemberList/index.md) - [AutoscalingMetric](https://docs.ezghcloud.com/compute-api/schemas/AutoscalingMetric/index.md) - [AutoscalingPolicy](https://docs.ezghcloud.com/compute-api/schemas/AutoscalingPolicy/index.md) - [AutoscalingRelease](https://docs.ezghcloud.com/compute-api/schemas/AutoscalingRelease/index.md) - [ConsoleOutput](https://docs.ezghcloud.com/compute-api/schemas/ConsoleOutput/index.md) - [ConsoleSession](https://docs.ezghcloud.com/compute-api/schemas/ConsoleSession/index.md) - [ConsoleSessionCreate](https://docs.ezghcloud.com/compute-api/schemas/ConsoleSessionCreate/index.md) - [Error](https://docs.ezghcloud.com/compute-api/schemas/Error/index.md) — Every non-2xx answer. Clients branch on code, never on message. - [ForceOption](https://docs.ezghcloud.com/compute-api/schemas/ForceOption/index.md) - [HealthEvent](https://docs.ezghcloud.com/compute-api/schemas/HealthEvent/index.md) - [HealthEventPage](https://docs.ezghcloud.com/compute-api/schemas/HealthEventPage/index.md) - [Instance](https://docs.ezghcloud.com/compute-api/schemas/Instance/index.md) - [InstanceCreate](https://docs.ezghcloud.com/compute-api/schemas/InstanceCreate/index.md) - [InstanceList](https://docs.ezghcloud.com/compute-api/schemas/InstanceList/index.md) - [InstanceResize](https://docs.ezghcloud.com/compute-api/schemas/InstanceResize/index.md) - [InstanceStatus](https://docs.ezghcloud.com/compute-api/schemas/InstanceStatus/index.md) - [InstanceStore](https://docs.ezghcloud.com/compute-api/schemas/InstanceStore/index.md) — Local NVMe disks on the instance's host, virtio-blk with serials store0, store1, …: ephemeral (contents are lost when the instance stops, is terminated or moves to another host; a reboot keeps them). null for types without. - [InstanceType](https://docs.ezghcloud.com/compute-api/schemas/InstanceType/index.md) - [InstanceTypeList](https://docs.ezghcloud.com/compute-api/schemas/InstanceTypeList/index.md) - [InstanceUpdate](https://docs.ezghcloud.com/compute-api/schemas/InstanceUpdate/index.md) - [LaunchSpecInput](https://docs.ezghcloud.com/compute-api/schemas/LaunchSpecInput/index.md) — A launch's fields minus what can't repeat across members: no name (members are named -<6 random base36>), no existing volumeId or networkInterfaceId, no privateIpv4Address, no rootVolume.snapshotId, no rootDevice (400 at that path). Everything else validates as POST …/instances does. - [NetworkInterfaceAttach](https://docs.ezghcloud.com/compute-api/schemas/NetworkInterfaceAttach/index.md) - [NetworkInterfaceDetach](https://docs.ezghcloud.com/compute-api/schemas/NetworkInterfaceDetach/index.md) - [ObservabilitySettings](https://docs.ezghcloud.com/compute-api/schemas/ObservabilitySettings/index.md) - [Operation](https://docs.ezghcloud.com/compute-api/schemas/Operation/index.md) - [OperationList](https://docs.ezghcloud.com/compute-api/schemas/OperationList/index.md) - [OperationStatus](https://docs.ezghcloud.com/compute-api/schemas/OperationStatus/index.md) - [QuotaExceeded](https://docs.ezghcloud.com/compute-api/schemas/QuotaExceeded/index.md) — quota_exceeded: the quota that refused the request. Never with Retry-After. - [SshKey](https://docs.ezghcloud.com/compute-api/schemas/SshKey/index.md) - [SshKeyCreate](https://docs.ezghcloud.com/compute-api/schemas/SshKeyCreate/index.md) - [SshKeyList](https://docs.ezghcloud.com/compute-api/schemas/SshKeyList/index.md) - [SshKeyUpdate](https://docs.ezghcloud.com/compute-api/schemas/SshKeyUpdate/index.md) - [StatusCheckGroup](https://docs.ezghcloud.com/compute-api/schemas/StatusCheckGroup/index.md) - [StatusCheckReason](https://docs.ezghcloud.com/compute-api/schemas/StatusCheckReason/index.md) - [StatusCheckStatus](https://docs.ezghcloud.com/compute-api/schemas/StatusCheckStatus/index.md) - [StatusChecks](https://docs.ezghcloud.com/compute-api/schemas/StatusChecks/index.md) — The instance's status checks, on get and list. system: problems EZGH fixes (the host, the VM process, volumes, the cell); instance: problems inside the guest (no answer to probes, a kernel panic). - [StatusReason](https://docs.ezghcloud.com/compute-api/schemas/StatusReason/index.md) - [Tags](https://docs.ezghcloud.com/compute-api/schemas/Tags/index.md) — At most 50; keys 1-128 characters, values at most 256, keys starting with ezgh: are reserved. - [VolumeAttach](https://docs.ezghcloud.com/compute-api/schemas/VolumeAttach/index.md) - [VolumeDetach](https://docs.ezghcloud.com/compute-api/schemas/VolumeDetach/index.md)