Enable or disable the firewall for a VPS instance
curl --request PUT \
--url https://api.storiza.store/vps/{vmId}/firewall/toggle \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"enabled": true
}
'const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({enabled: true})
};
fetch('https://api.storiza.store/vps/{vmId}/firewall/toggle', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.storiza.store/vps/{vmId}/firewall/toggle"
payload = { "enabled": True }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text){
"success": true,
"message": "Firewall toggled successfully",
"data": {
"enabled": true,
"warning": "<string>"
}
}Server firewall
Enable or disable the firewall for a VPS instance
Turns the VPS firewall on or off without touching its rules. Returns the resulting state along with a warning describing the risk of the new state.
Required API key permission: vps:write
PUT
/
vps
/
{vmId}
/
firewall
/
toggle
Enable or disable the firewall for a VPS instance
curl --request PUT \
--url https://api.storiza.store/vps/{vmId}/firewall/toggle \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"enabled": true
}
'const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({enabled: true})
};
fetch('https://api.storiza.store/vps/{vmId}/firewall/toggle', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.storiza.store/vps/{vmId}/firewall/toggle"
payload = { "enabled": True }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text){
"success": true,
"message": "Firewall toggled successfully",
"data": {
"enabled": true,
"warning": "<string>"
}
}Authorizations
An API key from the Storiza dashboard (API & Integrations), sent as Authorization: Bearer stz_….
Path Parameters
Minimum string length:
1Body
application/json
Was this page helpful?