curl --request DELETE \
--url https://api.tensorlake.ai/sandboxes/{sandbox_id}/file_systems \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"mount_path": "<string>"
}
'import requests
url = "https://api.tensorlake.ai/sandboxes/{sandbox_id}/file_systems"
payload = { "mount_path": "<string>" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.delete(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'DELETE',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({mount_path: '<string>'})
};
fetch('https://api.tensorlake.ai/sandboxes/{sandbox_id}/file_systems', 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}/file_systems",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_POSTFIELDS => json_encode([
'mount_path' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.tensorlake.ai/sandboxes/{sandbox_id}/file_systems"
payload := strings.NewReader("{\n \"mount_path\": \"<string>\"\n}")
req, _ := http.NewRequest("DELETE", 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))
}HttpResponse<String> response = Unirest.delete("https://api.tensorlake.ai/sandboxes/{sandbox_id}/file_systems")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"mount_path\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tensorlake.ai/sandboxes/{sandbox_id}/file_systems")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"mount_path\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"namespace": "<string>",
"status": "pending",
"created_at": 123,
"resources": {
"cpus": 123,
"memory_mb": 123,
"disk_mb": 123
},
"timeout_secs": 123,
"allow_unauthenticated_access": true,
"image": "<string>",
"pending_reason": "<string>",
"outcome": "<string>",
"termination_reason": "<string>",
"error_details": "<string>",
"container_id": "<string>",
"executor_id": "<string>",
"ingress_endpoint": "<string>",
"sandbox_url": "<string>",
"pool_id": "<string>",
"network_policy": {
"allow_internet_access": true,
"allow_out": [
"<string>"
],
"deny_out": [
"<string>"
]
},
"exposed_ports": [
32768
],
"template_id": "<string>",
"name": "<string>",
"file_systems": [
{
"file_system_id": "<string>",
"mount_path": "<string>",
"read_only": false,
"prefetch": false,
"snapshot_id": "<string>"
}
]
}Detach Filesystem
Detach the filesystem mounted at a guest path from a running sandbox. Returns 200 OK once the removal is persisted; the unmount applies asynchronously on the live sandbox.
curl --request DELETE \
--url https://api.tensorlake.ai/sandboxes/{sandbox_id}/file_systems \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"mount_path": "<string>"
}
'import requests
url = "https://api.tensorlake.ai/sandboxes/{sandbox_id}/file_systems"
payload = { "mount_path": "<string>" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.delete(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'DELETE',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({mount_path: '<string>'})
};
fetch('https://api.tensorlake.ai/sandboxes/{sandbox_id}/file_systems', 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}/file_systems",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_POSTFIELDS => json_encode([
'mount_path' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.tensorlake.ai/sandboxes/{sandbox_id}/file_systems"
payload := strings.NewReader("{\n \"mount_path\": \"<string>\"\n}")
req, _ := http.NewRequest("DELETE", 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))
}HttpResponse<String> response = Unirest.delete("https://api.tensorlake.ai/sandboxes/{sandbox_id}/file_systems")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"mount_path\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tensorlake.ai/sandboxes/{sandbox_id}/file_systems")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"mount_path\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"namespace": "<string>",
"status": "pending",
"created_at": 123,
"resources": {
"cpus": 123,
"memory_mb": 123,
"disk_mb": 123
},
"timeout_secs": 123,
"allow_unauthenticated_access": true,
"image": "<string>",
"pending_reason": "<string>",
"outcome": "<string>",
"termination_reason": "<string>",
"error_details": "<string>",
"container_id": "<string>",
"executor_id": "<string>",
"ingress_endpoint": "<string>",
"sandbox_url": "<string>",
"pool_id": "<string>",
"network_policy": {
"allow_internet_access": true,
"allow_out": [
"<string>"
],
"deny_out": [
"<string>"
]
},
"exposed_ports": [
32768
],
"template_id": "<string>",
"name": "<string>",
"file_systems": [
{
"file_system_id": "<string>",
"mount_path": "<string>",
"read_only": false,
"prefetch": false,
"snapshot_id": "<string>"
}
]
}- This path accepts either the sandbox ID or the sandbox name.
200 OKmeans the removal is persisted; the unmount applies asynchronously on the live sandbox moments later.- Tensorlake returns
404 Not Foundwhen no filesystem is mounted at the given path. - Tensorlake returns
409 Conflictwhen the sandbox is not running.
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
The sandbox ID or sandbox name.
Body
Absolute guest mount path of the filesystem to detach.
Response
Filesystem detach accepted and persisted; the returned sandbox no longer lists the file_systems entry
pending, running, snapshotting, suspending, suspended, terminated Milliseconds since Unix epoch.
Show child attributes
Show child attributes
Whether sandbox ingress may route requests without auth validation.
Present when status is pending.
Platform-specific termination outcome string returned for completed sandboxes.
Typed reason the sandbox terminated (e.g. FileSystemNotFound, FileSystemSnapshotNotFound, ImageNotFound). Present on failed terminations.
Human-readable detail accompanying termination_reason.
Canonical server-provided base for sandbox-specific ingress.
Sandbox-specific management URL derived from ingress_endpoint.
Show child attributes
Show child attributes
Additional routable ingress ports. When null, only the management port 9501 is routable.
1 <= x <= 65535Filesystems currently mounted into the sandbox.
Show child attributes
Show child attributes
Was this page helpful?