Delete service volume
curl --request DELETE \
--url https://api.instacloud.com/projects/{projectId}/services/{serviceId}/volume \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.instacloud.com/projects/{projectId}/services/{serviceId}/volume"
headers = {"Authorization": "Bearer <token>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.instacloud.com/projects/{projectId}/services/{serviceId}/volume', 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.instacloud.com/projects/{projectId}/services/{serviceId}/volume",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
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.instacloud.com/projects/{projectId}/services/{serviceId}/volume"
req, _ := http.NewRequest("DELETE", 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.delete("https://api.instacloud.com/projects/{projectId}/services/{serviceId}/volume")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.instacloud.com/projects/{projectId}/services/{serviceId}/volume")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"volume": null,
"cap": {
"volumeGib": 123
},
"removed": true,
"service": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"project_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "postgres",
"name": "<string>",
"spec": {},
"machine_count": 123,
"desired_state": "running",
"always_on": true,
"websocket": true,
"region": "<string>",
"domain": "<string>",
"public": true,
"image": "<string>",
"port": 123,
"start_command": "<string>",
"volume_applied_mount_path": "<string>",
"volume_mount_path": "<string>",
"volume_gib": 123,
"pg_version": 123,
"template_deployment_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"template_modified": true,
"template_code": "<string>",
"template_logo_url": "<string>",
"source": {
"type": "image",
"owner": "<string>",
"repo": "<string>",
"branch": "<string>",
"auto_deploy": true
},
"status": "creating",
"created_at": "2023-11-07T05:31:56Z"
}
}{
"status": "approval_required",
"approvalId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"action": "<string>",
"actions": [
"<string>"
],
"message": "<string>",
"url": "<string>",
"nextActions": [
{
"op": "<string>",
"reason": "<string>",
"args": {},
"gated": true
}
]
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}Services
Delete service volume
Token scope: account · org · project — read-only tokens refused (not a GET).
Delete a compute service’s persistent volume (compute only — a managed database’s volume is its data directory and cannot be removed). DESTRUCTIVE and immediate: the disk and ALL its data are destroyed (there is no detach and no undo — download anything you need first). The machines are rebuilt without the mount right away, so billing for the volume stops now, idle wake returns to sub-second (suspend instead of cold stop/start), and the service may scale out again. Any plan; allowed even while the org is billing-suspended (deleting only reduces what bills).
DELETE
/
projects
/
{projectId}
/
services
/
{serviceId}
/
volume
Delete service volume
curl --request DELETE \
--url https://api.instacloud.com/projects/{projectId}/services/{serviceId}/volume \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.instacloud.com/projects/{projectId}/services/{serviceId}/volume"
headers = {"Authorization": "Bearer <token>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.instacloud.com/projects/{projectId}/services/{serviceId}/volume', 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.instacloud.com/projects/{projectId}/services/{serviceId}/volume",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
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.instacloud.com/projects/{projectId}/services/{serviceId}/volume"
req, _ := http.NewRequest("DELETE", 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.delete("https://api.instacloud.com/projects/{projectId}/services/{serviceId}/volume")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.instacloud.com/projects/{projectId}/services/{serviceId}/volume")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"volume": null,
"cap": {
"volumeGib": 123
},
"removed": true,
"service": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"project_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "postgres",
"name": "<string>",
"spec": {},
"machine_count": 123,
"desired_state": "running",
"always_on": true,
"websocket": true,
"region": "<string>",
"domain": "<string>",
"public": true,
"image": "<string>",
"port": 123,
"start_command": "<string>",
"volume_applied_mount_path": "<string>",
"volume_mount_path": "<string>",
"volume_gib": 123,
"pg_version": 123,
"template_deployment_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"template_modified": true,
"template_code": "<string>",
"template_logo_url": "<string>",
"source": {
"type": "image",
"owner": "<string>",
"repo": "<string>",
"branch": "<string>",
"auto_deploy": true
},
"status": "creating",
"created_at": "2023-11-07T05:31:56Z"
}
}{
"status": "approval_required",
"approvalId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"action": "<string>",
"actions": [
"<string>"
],
"message": "<string>",
"url": "<string>",
"nextActions": [
{
"op": "<string>",
"reason": "<string>",
"args": {},
"gated": true
}
]
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}Authorizations
Session access JWT or an API token (insta_<prefix>_<secret>).