Resume a sandbox
curl --request POST \
--url https://api.tensorlake.ai/sandboxes/{sandbox_id}/resume \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.tensorlake.ai/sandboxes/{sandbox_id}/resume"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.tensorlake.ai/sandboxes/{sandbox_id}/resume', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.tensorlake.ai/sandboxes/{sandbox_id}/resume",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.tensorlake.ai/sandboxes/{sandbox_id}/resume"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.tensorlake.ai/sandboxes/{sandbox_id}/resume")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tensorlake.ai/sandboxes/{sandbox_id}/resume")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_bodyLife Cycle Management
Resume Sandbox
Resume a suspended sandbox or explicitly retry a recoverable resume failure.
POST
/
sandboxes
/
{sandbox_id}
/
resume
Resume a sandbox
curl --request POST \
--url https://api.tensorlake.ai/sandboxes/{sandbox_id}/resume \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.tensorlake.ai/sandboxes/{sandbox_id}/resume"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.tensorlake.ai/sandboxes/{sandbox_id}/resume', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.tensorlake.ai/sandboxes/{sandbox_id}/resume",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.tensorlake.ai/sandboxes/{sandbox_id}/resume"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.tensorlake.ai/sandboxes/{sandbox_id}/resume")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tensorlake.ai/sandboxes/{sandbox_id}/resume")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_bodyResume a
suspended or resume_failed sandbox from its retained checkpoint, preserving the sandbox ID. For resume_failed, an accepted retry clears the previous error_details and starts another attempt using the original snapshot_id. Another attempt can fail; acceptance is not a guarantee of recovery.
- This path accepts either the sandbox ID or the sandbox name.
- Tensorlake returns
202 Acceptedwhen resume is pending. Read Get Sandbox untilstatusisrunningbefore executing commands. - Tensorlake returns
200 OKwhen the sandbox is running. Success responses have no JSON body. - Pass
wait_msto wait for the transition, up to 30000 ms. An unfinished wait returns202; a failed or superseded lifecycle request can return409 Conflict. - An unsupported state or a missing or unusable checkpoint returns
400 Bad Request.
resume_failed confirms this recoverable failure state; pending with retained_runtime.state: resume_uncertain remains unresolved. See Recover from a failed resume for a bounded recovery flow.
Proxy traffic never retries resume_failed, regardless of auto_resume. Proxy traffic can resume a suspended named sandbox when auto_resume is true (the default). When it is false, the proxy returns HTTP 409 with code SANDBOX_AUTO_RESUME_DISABLED instead.
This explicit resume endpoint works regardless of auto_resume and does not change it. If it is false, the sandbox still rejects proxy-triggered resume after its next suspension. To re-enable automatic resume, update the sandbox with auto_resume: true.Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
The sandbox ID or sandbox name.
Query Parameters
Wait for readiness for up to this many milliseconds, capped at 30000. Defaults to 0 (asynchronous acceptance). Expiry returns 202 and does not cancel the attempt.
Required range:
x >= 0Response
Sandbox is running. Empty response body.
Was this page helpful?