Restore a snapshot
Create a new server from the snapshot. The original server stays as it is. The new server gets the original's team, size and attachments. The new server gets new IP addresses unless you send reserved IPs. To restore a snapshot taken in another zone, call this zone and send that zone in from_availability_zone.
The ID of the snapshot to restore.
Bearer $TOKEN
application/json
The new server's name. Defaults to a name made from the snapshot's name.
The zone the snapshot was taken in, when it isn't this zone. The new server is created in the zone you call.
The IDs of reserved IPs to give the new server. Each reserved IP must be unassigned, in the zone you call and in the snapshot's team.
Whether the new server gets a public IPv4 address. Leave it out to use the snapshot's setting. When you leave it out and send a reserved IPv4 address in reserved_ip_ids, the new server gets a public IPv4 address.
Whether the new server has DDoS protection. Leave it out to use the snapshot's setting.
Whether AI Engineer can sign in to the new server over SSH. Leave it out to use the snapshot's setting. A snapshot without a setting allows it.
Whether we scan the new server for vulnerabilities every day. Leave it out to use the snapshot's setting.
Whether to set a new root password and return it once. Send false or leave it out to keep the passwords from the snapshot.
Whether the new server gets its own subdomain, made from its name. Defaults to true. The original server keeps its subdomain.
Cloudflare DNS records to point at the new server. Each entry creates an A record and an AAAA record named cloudflare_a_record in the Cloudflare zone cloudflare_domain.
The ID of the Cloudflare account that holds the zone. Connect the account to your team first, under Integrations → Cloudflare in the web app.
The Cloudflare zone to add the records to, such as example.com.
The record name, such as www.
Whether Cloudflare proxies traffic to the server. Defaults to false.
The records' TTL in seconds, from 60 to 86400, or 1 for automatic. A proxied record must use 1. Defaults to automatic.
{
"root_password": "example"
}
{
"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": "The request could not be completed right now. Please try again in a few moments.",
"code": "internal_error"
}
}
Returns the server.
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 organization has reached its quota of servers. The error code is quota_exceeded.
The snapshot isn't in this zone, or the token can't access it. For a snapshot taken in another zone, send that zone in from_availability_zone. A cloudflare_account_id whose Cloudflare account isn't connected to your team also returns 404.
The snapshot can't be restored because it's still being taken or it failed. The error code is snapshot_not_restorable.
A value is missing or invalid. Or you must connect the Cloudflare account again. Or the cloudflare_domain isn't a zone of the account in cloudflare_account_id. The error code is validation_failed.
The snapshot is locked.
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.
We couldn't get the snapshot from the zone it was taken in. The error code is cross_az_unavailable.
We have no room for the new server, and the error code is no_capacity. Or we couldn't create it, and the error code is orchestration_failed.
Getting the snapshot from the zone it was taken in timed out. The error code is cross_az_timeout.
The new server's root password. Returned once, when you send root_password set to true, so save it then.