સર્વરના લેબલ થયેલ સ્નેપશોટ લો, તેમને યાદી કરો અને જેની તમારે હવે જરૂર નથી તે કાઢી નાંખો.
તમારા ખાતામાં સ્નેપશોટ પાછા આપે છે, નવી પહેલી, પાના દીઠ ૨૫.
જરૂરી પરવાનગી: snapshots:list
curl -X GET "https://admin.vps.org/api/v1/snapshots/" \
-H "Authorization: Bearer YOUR_API_TOKEN"
import requests
url = "https://admin.vps.org/api/v1/snapshots/"
headers = {"Authorization": "Bearer YOUR_API_TOKEN"}
response = requests.get(url, headers=headers)
for snapshot in response.json()["results"]:
print(snapshot["uuid"], snapshot["label"], snapshot["ready"])
const response = await fetch('https://admin.vps.org/api/v1/snapshots/', {
headers: { 'Authorization': 'Bearer YOUR_API_TOKEN' }
});
const data = await response.json();
console.log(data.results);
{
"count": 1,
"next": null,
"previous": null,
"results": [
{
"uuid": "3f9a1c0e5b7d4e2f8a6c1b3d5e7f9a0b",
"label": "before-upgrade",
"server_hostname": "web-01",
"ready": true,
"deleting": false,
"created_at": "2026-09-14T18:30:00.000000Z",
"size_gb": 3.4
}
]
}
| ક્ષેત્ર | પ્રકાર | વર્ણન |
|---|---|---|
uuid |
string | સ્નેપશોટ ઓળખનાર (૩૨ hex અક્ષરો, કોઈ હાયફન નથી) |
label |
string | લેબલ જ્યારે સ્નેપશોટ બનાવેલ હતો ત્યારે આપવામાં આવ્યું હતું |
server_hostname |
string | સર્વરનું યજમાનનામ કે જેનાથી સ્નેપશોટ લેવાયો હતો, અથવા નકામો જો સર્વર હવે અસ્તિત્વમાં ન હોય |
ready |
boolean | જ્યારે સ્નેપશોટ સમાપ્ત થાય ત્યારે સાચું |
deleting |
boolean | જ્યારે કાઢી નાખવાનું પ્રગતિમાં હોય ત્યારે સાચું |
created_at |
datetime | બનાવટ સમય (ISO 8601, UTC) |
size_gb |
number | ગીગાબાઇટ્સમાં સંકોચાયેલ માપ |
ઉપરના ક્ષેત્રો સાથે એક સ્નેપશોટ વસ્તુ પાછી આપે છે. સ્નેપશોટ બનાવ્યા પછી પોલ તૈયાર કરવા માટે તેને વાપરો.
curl -X GET "https://admin.vps.org/api/v1/snapshots/3f9a1c0e5b7d4e2f8a6c1b3d5e7f9a0b/" \
-H "Authorization: Bearer YOUR_API_TOKEN"
વિસ્તૃત સર્વરના સ્નેપશોટને કતારમાં મૂકે છે અને નવી સ્નેપશોટની uuid પાછી આપે છે. સ્નેપશોટ તરત જ તૈયાર સાથે યાદી થયેલ છે, ખોટુ સુયોજિત થયેલ છે.
જરૂરી પરવાનગી: servers:snapshot
| પરિમાણો | પ્રકાર | જરૂરી | વર્ણન |
|---|---|---|---|
action |
string | હા | સ્નેપશોટ હોવુ જ જોઇએ |
snapshot_label |
string | હા | સ્નેપશોટને ઓળખવા માટે લેબલ |
curl -X POST "https://admin.vps.org/api/v1/servers/8c4f2a1e-5b3d-4e6f-9a7b-1c2d3e4f5a6b/snapshot/" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{"action": "snapshot", "snapshot_label": "before-upgrade"}'
import requests
server_uuid = "8c4f2a1e-5b3d-4e6f-9a7b-1c2d3e4f5a6b"
url = f"https://admin.vps.org/api/v1/servers/{server_uuid}/snapshot/"
headers = {"Authorization": "Bearer YOUR_API_TOKEN"}
data = {"action": "snapshot", "snapshot_label": "before-upgrade"}
response = requests.post(url, headers=headers, json=data)
print(response.json()["snapshot_uuid"])
{
"message": "Snapshot queued successfully",
"snapshot_uuid": "3f9a1c0e5b7d4e2f8a6c1b3d5e7f9a0b"
}
| 200 | ક્રિયા કતારમાં હતી |
| 400 | ક્રિયા અથવા સ્નેપશોટ લેબલ ગુમ થયેલ છે, અથવા સર્વર હજુ સુધી સ્થાપિત થયેલ નથી |
| 402 | ફાઇલ પર કોઈ ચૂકવણી પદ્ધતિ નથી, અથવા ચૂકવણી થયેલ બિલ નથી |
| 404 | મળ્યુ નથી, અથવા તે બીજા ખાતાને લગતુ છે |
કાયમી કાઢી નાંખવા માટે સ્નેપશોટને કતારમાં મૂકે છે. કાઢી નાંખવું એ ત્યાં સુધી સાચું છે જ્યાં સુધી તે ચાલ્યું ન જાય.
જરૂરી પરવાનગી: snapshots:delete
curl -X DELETE "https://admin.vps.org/api/v1/snapshots/3f9a1c0e5b7d4e2f8a6c1b3d5e7f9a0b/" \
-H "Authorization: Bearer YOUR_API_TOKEN"
{
"message": "Snapshot deletion queued"
}
| 202 | સ્વીકારેલ: વિનંતી કતારમાં મૂકવામાં આવી હતી |
| 404 | મળ્યુ નથી, અથવા તે બીજા ખાતાને લગતુ છે |