Restore a ClickHouse instance
Restore a ClickHouse instance from one of its own snapshots. Data written after the snapshot is lost. The instance keeps its hostname and password.
The ID of the ClickHouse instance to restore.
Bearer $TOKEN
application/json
The ID of the snapshot to restore. Must be a snapshot of this instance.
{
"id": "example",
"name": "Example ClickHouse instance",
"type": "CH1",
"usable_disk_gb": 1,
"max_concurrent_queries": 1,
"engine_version": "1.4.2",
"engine_patch_version": "1.4.2",
"available_engine_versions": [
"1.4.2"
],
"status": "provisioning",
"status_message": "example",
"timezone": "UTC",
"public_access": false,
"endpoint": {
"hostname": "proxy.example.com",
"public_hostname": "proxy.example.com",
"ports": {
"native": 1,
"native_tls": 1,
"http": 1,
"https": 1
},
"private_ips": [
{
"network_id": "123456789",
"ip_address": "example"
}
],
"public_ips": [
{
"ip": "example",
"type": "example"
}
]
},
"members": [
{
"id": "example",
"role": "primary",
"status": "provisioning",
"disk_used_bytes": 1,
"private_ips": [
{
"network_id": "123456789",
"ip_address": "example"
}
],
"created_at": "2026-07-01T12:00:00.000Z"
}
],
"network_ids": [
"123456789"
],
"firewall_ids": [
"123456789"
],
"latest_snapshot_at": "2026-07-01T12:00:00.000Z",
"term": "monthly",
"created_at": "2026-07-01T12:00:00.000Z",
"updated_at": "2026-07-01T12:00:00.000Z",
"team_id": "t123",
"metadata": {
"example": "value"
}
}
{
"error": {
"message": "Malformed JSON body.",
"code": "bad_request"
}
}
{
"error": {
"message": "Missing or invalid token.",
"code": "unauthorized"
}
}
{
"error": {
"message": "We require at least one successful credit card transaction before allowing billable actions via the API. This significantly helps us to prevent fraud. Once your first transaction is processed, you will be able to use the API unrestricted. Please add credit to your account at https://betterstack.com/settings/billing/card/new?credits=10&activate_api=true. Need help? We're here for you at hello@betterstack.com.",
"code": "payment_required"
}
}
{
"error": {
"message": "This token is read-only and cannot be used for write operations.",
"code": "read_only_token"
}
}
{
"error": {
"message": "Resource not found.",
"code": "not_found"
}
}
{
"error": {
"message": "The request could not be completed right now. Please try again in a few moments.",
"code": "internal_error"
}
}
Returns the ClickHouse instance.
The body isn't valid JSON.
The API token is missing or invalid.
The organization hasn't made its first payment yet, and the request creates a resource we charge for. The code is payment_required. A request that creates a server, load balancer, object cache, database, reserved IP or volume can also return first_purchase. The url in first_purchase opens a page where you make the payment. The resource is created after the payment. The page works until expires_at, 24 hours after the response.
The request would go over a quota, with the code quota_exceeded. Or a read-only token tried to make a change, with the code read_only_token. Or a rule of the resource forbids it.
The resource doesn't exist, it's in another zone, or your token can't access it.
The resource's state doesn't allow the request, such as starting a running server or removing a placement group that still has servers.
A value isn't valid, with the code validation_failed. The error's details list the messages for each field. A create or rescale that names a deprecated type with a replacement returns the code type_deprecated. The error's details then name the field, the deprecated type and its replacement.
We've locked the resource, with the code locked. Every change to a locked resource is refused, and so is a change that involves one.
Too many requests, with the code rate_limited. We limit requests per client IP and per organization, and some costly endpoints have a stricter limit. Wait as long as the Retry-After header says.
An unexpected, temporary error on our side, with the code internal_error. Try again.
The zone has no capacity, with the code no_capacity. Or we couldn't set up or change the resource, with the code orchestration_failed. Or the organization is creating too many resources at the same time, with the code concurrent_create_limit. Try again after a short wait.
The instance's ID, a UUID.
The instance's name, up to 255 characters.
The instance's plan, such as CH2. Get the plans via betterstack clickhouse-type list.
Storage for your data, in GiB.
The most queries the plan runs at the same time. A query over this limit fails at once.
The ClickHouse LTS version, such as 26.8. Get the versions via betterstack clickhouse-version list.
The exact ClickHouse version the instance runs, or null until the instance's first upgrade.
The versions you can upgrade the instance to now. Holds the next LTS version once we offer it, and is empty until then.
The instance's state.
Valid values:provisioning: We're creating the instance.running: The instance is ready.degraded: The instance works, but needs attention. status_message says why.rescaling: We're changing the plan. When the change doesn't complete, the instance returns to running with a status_message.upgrading: We're upgrading the ClickHouse version. The upgrade is done when the instance is running on the new engine_version. When the instance is running on the old version with a status_message, the upgrade failed.restoring: We're restoring a snapshot onto the instance. The instance is running again once ClickHouse responds to queries.failed: The instance couldn't be created or recovered. A failed instance stays in this state.destroyed: The instance is deleted.
Why the instance failed or is degraded, or why an operation didn't complete.
The default time zone for date and time functions, UTC or an IANA name such as Europe/Prague.
Whether the instance accepts connections on a public IP. The TLS ports 9440 and 8443 are public. The ports without TLS stay on private networks.
Where to connect to the instance.
The hostname to connect to from your private networks. The hostname resolves to the instance's addresses in those networks.
The hostname to connect to from the internet, or null when public_access is false. The hostname resolves to the instance's public IP addresses.
The ports the instance listens on.
The native protocol port, 9000.
The native protocol port with TLS, 9440.
The HTTP port, 8123.
The HTTPS port, 8443.
The instance's addresses in the private networks attached to it.
The ID of the private network.
The instance's IP address in that network.
The instance's public IP addresses. Empty when public_access is false.
The public IP address.
The address type, ipv4 or ipv6.
The node that runs the instance. An instance has one.
The member's ID.
The member's role, always primary. Possible values: primary.
The member's state.
Valid values:provisioning: We're creating the member.running: The member is up.down: The member doesn't respond.
The disk space the member uses, in bytes.
The member's addresses in the attached private networks.
The ID of the private network.
The member's IP address in that network.
When the member was created. In ISO 8601 format, such as 2026-07-01T12:00:00Z.
The IDs of the private networks attached to the instance. Order doesn't matter.
The IDs of the firewalls attached to the instance, at most one. Order doesn't matter.
When the newest available snapshot was created, or null when the instance has no snapshot. In ISO 8601 format, such as 2026-07-01T12:00:00Z.
The billing term.
Valid values:monthly: Billed every month.annual: Paid for a year.
When the instance was created. In ISO 8601 format, such as 2026-07-01T12:00:00Z.
When the instance was last updated. In ISO 8601 format, such as 2026-07-01T12:00:00Z.
The ID of the team that owns the instance. betterstack team list shows it.
Your own tags as string pairs, at most 10.