Replace the sleeping tenant's data directory with a snapshot's state.
const url = 'https://infra-hyphae.run/v0/projects/example/restore';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"snapshot_id":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://infra-hyphae.run/v0/projects/example/restore \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "snapshot_id": "example" }'Runs hyphae restore --backup <snapshot dir> --data-dir <fresh dir>
(Native verifies the backup, stages, runs doctor, activates), then
swaps the fresh directory into place. The previous directory is moved
aside under replaced/ and retained; the Cloud deletes nothing. This
is a replacement, not a branch: there is one data directory per
project. The tenant is left asleep. 409 tenant_running if awake;
404 for an unknown snapshot id.
Authorizations
Section titled “Authorizations”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters”Request Bodyrequired
Section titled “Request Bodyrequired”object
Examplegenerated
{ "snapshot_id": "example"}Responses
Section titled “ Responses ”Restored; tenant is sleeping.
object
RFC 3339, UTC.
Where the previous data directory was moved. Retained, never deleted by the Cloud.
Output of hyphae restore. Field names are Native’s.
object
Output of hyphae backup create / backup verify. Field names are Native’s.
object
object
Example
{ "state": "stopped", "native": { "backup": { "status": "created" }, "status": "restored" }}Malformed or out-of-bounds input (invalid_request).
object
object
Example
{ "error": { "code": "invalid_request" }}Missing, malformed, duplicate, or unknown credential (authentication_required).
object
object
Example
{ "error": { "code": "invalid_request" }}Headers
Section titled “Headers”Unknown route, or a project the caller does not own (not_found).
object
object
Example
{ "error": { "code": "invalid_request" }}The operation needs Native’s directory lock and the engine is running; sleep the tenant first (tenant_running).
object
object
Example
{ "error": { "code": "invalid_request" }}The engine failed to start or did not answer (upstream_unavailable).
object
object
Example
{ "error": { "code": "invalid_request" }}The host cannot run tenants right now — engine binary missing, wrong pin, or ports exhausted (orchestrator_unavailable).
object
object
Example
{ "error": { "code": "invalid_request" }}