curl --request POST \
--url https://api.staging.bma.beeos.ai/api/v1/orgs/{orgID}/projects/{projectID}/machines/{machineID}/restore \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"backup_id": "<string>"
}
'import requests
url = "https://api.staging.bma.beeos.ai/api/v1/orgs/{orgID}/projects/{projectID}/machines/{machineID}/restore"
payload = { "backup_id": "<string>" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({backup_id: '<string>'})
};
fetch('https://api.staging.bma.beeos.ai/api/v1/orgs/{orgID}/projects/{projectID}/machines/{machineID}/restore', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.staging.bma.beeos.ai/api/v1/orgs/{orgID}/projects/{projectID}/machines/{machineID}/restore"
payload := strings.NewReader("{\n \"backup_id\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"id": "<string>",
"machine_id": "<string>",
"state": "uploading",
"reason": "pause",
"paths": [
"<string>"
],
"exclude": [
"<string>"
],
"size_bytes": 123,
"digest": "<string>",
"error": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"completed_at": "2023-11-07T05:31:56Z"
}{
"error": "<string>",
"code": "<string>",
"current_digest": "<string>",
"issues": [
{
"path": "<string>",
"message": "<string>",
"line": 2,
"column": 2
}
]
}{
"error": "<string>",
"code": "<string>",
"current_digest": "<string>",
"issues": [
{
"path": "<string>",
"message": "<string>",
"line": 2,
"column": 2
}
]
}{
"error": "<string>",
"code": "<string>",
"current_digest": "<string>",
"issues": [
{
"path": "<string>",
"message": "<string>",
"line": 2,
"column": 2
}
]
}{
"error": "<string>",
"code": "<string>",
"current_digest": "<string>",
"issues": [
{
"path": "<string>",
"message": "<string>",
"line": 2,
"column": 2
}
]
}{
"error": "<string>",
"code": "<string>",
"current_digest": "<string>",
"issues": [
{
"path": "<string>",
"message": "<string>",
"line": 2,
"column": 2
}
]
}{
"error": "<string>",
"code": "<string>",
"current_digest": "<string>",
"issues": [
{
"path": "<string>",
"message": "<string>",
"line": 2,
"column": 2
}
]
}{
"error": "<string>",
"code": "<string>"
}{
"error": "<string>",
"code": "<string>"
}Recreate a machine from a workspace backup
Replaces the machine with a new one created from its template and restores a backup (the newest ready one unless backup_id is given) before the machine comes online again. Only files under the backed-up paths are restored; system-level changes and running processes are not kept. The machine’s lifecycle_reason_code reports restoring_from_backup, then restored_from_backup or backup_restore_failed. BMA does the same on its own when the provider loses a machine that has a backup.
curl --request POST \
--url https://api.staging.bma.beeos.ai/api/v1/orgs/{orgID}/projects/{projectID}/machines/{machineID}/restore \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"backup_id": "<string>"
}
'import requests
url = "https://api.staging.bma.beeos.ai/api/v1/orgs/{orgID}/projects/{projectID}/machines/{machineID}/restore"
payload = { "backup_id": "<string>" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({backup_id: '<string>'})
};
fetch('https://api.staging.bma.beeos.ai/api/v1/orgs/{orgID}/projects/{projectID}/machines/{machineID}/restore', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.staging.bma.beeos.ai/api/v1/orgs/{orgID}/projects/{projectID}/machines/{machineID}/restore"
payload := strings.NewReader("{\n \"backup_id\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"id": "<string>",
"machine_id": "<string>",
"state": "uploading",
"reason": "pause",
"paths": [
"<string>"
],
"exclude": [
"<string>"
],
"size_bytes": 123,
"digest": "<string>",
"error": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"completed_at": "2023-11-07T05:31:56Z"
}{
"error": "<string>",
"code": "<string>",
"current_digest": "<string>",
"issues": [
{
"path": "<string>",
"message": "<string>",
"line": 2,
"column": 2
}
]
}{
"error": "<string>",
"code": "<string>",
"current_digest": "<string>",
"issues": [
{
"path": "<string>",
"message": "<string>",
"line": 2,
"column": 2
}
]
}{
"error": "<string>",
"code": "<string>",
"current_digest": "<string>",
"issues": [
{
"path": "<string>",
"message": "<string>",
"line": 2,
"column": 2
}
]
}{
"error": "<string>",
"code": "<string>",
"current_digest": "<string>",
"issues": [
{
"path": "<string>",
"message": "<string>",
"line": 2,
"column": 2
}
]
}{
"error": "<string>",
"code": "<string>",
"current_digest": "<string>",
"issues": [
{
"path": "<string>",
"message": "<string>",
"line": 2,
"column": 2
}
]
}{
"error": "<string>",
"code": "<string>",
"current_digest": "<string>",
"issues": [
{
"path": "<string>",
"message": "<string>",
"line": 2,
"column": 2
}
]
}{
"error": "<string>",
"code": "<string>"
}{
"error": "<string>",
"code": "<string>"
}Authorizations
An opaque BMA personal or organization bearer token.
Path Parameters
Organization ID (org_...).
^org_[a-z2-7]{26}$Project ID (proj_...).
^proj_[a-z2-7]{26}$Machine ID (mch_...).
^mch_[a-z2-7]{26}$Body
The ready backup to restore; defaults to the newest.
^mbk_[a-z2-7]{26}$Response
The machine is being recreated; this is the backup it restores.
^mbk_[a-z2-7]{26}$Machine ID (mch_...).
^mch_[a-z2-7]{26}$uploading, ready, failed What took the backup.
pause, periodic, manual Archive size; set once ready.
SHA-256 digest of the tar+zstd archive; set once ready.
Why a failed backup failed; empty otherwise.