Set pause when idle
curl --request PUT \
--url https://api.compute.anonalabs.com/v1/sandboxes/{sandboxID}/auto-pause \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"idleMinutes": 5040
}
'import requests
url = "https://api.compute.anonalabs.com/v1/sandboxes/{sandboxID}/auto-pause"
payload = { "idleMinutes": 5040 }
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({idleMinutes: 5040})
};
fetch('https://api.compute.anonalabs.com/v1/sandboxes/{sandboxID}/auto-pause', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"sandboxID": "<string>",
"allowPublicTraffic": true,
"publicPorts": [
123
],
"idlePauseMinutes": 123
}{
"code": 123,
"message": "<string>",
"error_code": "<string>"
}{
"code": 123,
"message": "<string>",
"error_code": "<string>"
}Sandbox access
Set pause when idle
Pause the sandbox after this many minutes with no traffic, sessions or envd processes. 0 turns it off.
PUT
/
v1
/
sandboxes
/
{sandboxID}
/
auto-pause
Set pause when idle
curl --request PUT \
--url https://api.compute.anonalabs.com/v1/sandboxes/{sandboxID}/auto-pause \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"idleMinutes": 5040
}
'import requests
url = "https://api.compute.anonalabs.com/v1/sandboxes/{sandboxID}/auto-pause"
payload = { "idleMinutes": 5040 }
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({idleMinutes: 5040})
};
fetch('https://api.compute.anonalabs.com/v1/sandboxes/{sandboxID}/auto-pause', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"sandboxID": "<string>",
"allowPublicTraffic": true,
"publicPorts": [
123
],
"idlePauseMinutes": 123
}{
"code": 123,
"message": "<string>",
"error_code": "<string>"
}{
"code": 123,
"message": "<string>",
"error_code": "<string>"
}Authorizations
ApiKeyAuthBearerAuth
An Anona Compute API key (e2b_ followed by lowercase hex).
Path Parameters
Body
application/json
Required range:
0 <= x <= 10080