சேவையக காப்புப்பிரதிகளை நிரல் ரீதியாக நிர்வகிக்கவும். உங்கள் சேவையகங்களுக்கான காப்புப்பிரதிகளை பட்டியலிடவும், உருவாக்கவும், மீட்டெடுக்கவும் மற்றும் நீக்கவும்.
உங்கள் சேவையகங்களில் உள்ள அனைத்து காப்புப்பிரதிகளின் பட்டியலையும் மீட்டெடுக்கவும்.
| அளவுரு | வகை | அவசியம் | விளக்கம் |
|---|---|---|---|
server_id |
integer | இல்லை | சேவையக ஐடி மூலம் காப்புப்பிரதிகளை வடிகட்டவும் |
backup_type |
string | இல்லை | வகையின்படி வடிகட்டவும்: manual , automatic |
curl -X GET "https://admin.vps.org/api/v1/backups/?server_id=12345" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json"
import requests
url = "https://admin.vps.org/api/v1/backups/"
headers = {
"Authorization": "Bearer YOUR_API_TOKEN",
"Content-Type": "application/json"
}
params = {"server_id": 12345}
response = requests.get(url, headers=headers, params=params)
print(response.json())
const response = await fetch('https://admin.vps.org/api/v1/backups/?server_id=12345', {
method: 'GET',
headers: {
'Authorization': 'Bearer YOUR_API_TOKEN',
'Content-Type': 'application/json'
}
});
const backups = await response.json();
console.log(backups);
{
"count": 3,
"results": [
{
"id": 501,
"server": {
"id": 12345,
"name": "web-server-01"
},
"backup_type": "automatic",
"status": "completed",
"size_mb": 4523,
"created_at": "2025-01-16T03:00:00Z",
"expires_at": "2025-02-16T03:00:00Z",
"description": "Automatic daily backup"
},
{
"id": 499,
"server": {
"id": 12345,
"name": "web-server-01"
},
"backup_type": "manual",
"status": "completed",
"size_mb": 4456,
"created_at": "2025-01-14T10:30:00Z",
"expires_at": null,
"description": "Pre-update backup"
},
{
"id": 495,
"server": {
"id": 12345,
"name": "web-server-01"
},
"backup_type": "automatic",
"status": "completed",
"size_mb": 4389,
"created_at": "2025-01-15T03:00:00Z",
"expires_at": "2025-02-15T03:00:00Z",
"description": "Automatic daily backup"
}
]
}
| 200 | காப்புப் பட்டியல் வெற்றிகரமாக மீட்டெடுக்கப்பட்டது. |
| 401 | அங்கீகரிக்கப்படாதது - தவறான அங்கீகார டோக்கன் அல்லது காணவில்லை. |
ஒரு சேவையகத்தின் கைமுறை காப்புப்பிரதியை உருவாக்கவும். கைமுறை காப்புப்பிரதிகள் தானாக காலாவதியாகாது.
| அளவுரு | வகை | அவசியம் | விளக்கம் |
|---|---|---|---|
server_id |
integer | ஆம் | காப்புப்பிரதி எடுக்க வேண்டிய சேவையகத்தின் ஐடி |
description |
string | இல்லை | காப்புப்பிரதிக்கான விருப்ப விளக்கம் |
curl -X POST "https://admin.vps.org/api/v1/backups/" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"server_id": 12345,
"description": "Pre-deployment backup"
}'
import requests
url = "https://admin.vps.org/api/v1/backups/"
headers = {
"Authorization": "Bearer YOUR_API_TOKEN",
"Content-Type": "application/json"
}
data = {
"server_id": 12345,
"description": "Pre-deployment backup"
}
response = requests.post(url, headers=headers, json=data)
print(response.json())
const response = await fetch('https://admin.vps.org/api/v1/backups/', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_API_TOKEN',
'Content-Type': 'application/json'
},
body: JSON.stringify({
server_id: 12345,
description: 'Pre-deployment backup'
})
});
const backup = await response.json();
console.log(backup);
$data = [
'server_id' => 12345,
'description' => 'Pre-deployment backup'
];
$ch = curl_init('https://admin.vps.org/api/v1/backups/');
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($data));
curl_setopt($ch, CURLOPT_HTTPHEADER, [
'Authorization: Bearer YOUR_API_TOKEN',
'Content-Type: application/json'
]);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
$backup = json_decode($response, true);
curl_close($ch);
{
"id": 502,
"server": {
"id": 12345,
"name": "web-server-01"
},
"backup_type": "manual",
"status": "in_progress",
"size_mb": null,
"created_at": "2025-01-16T15:45:00Z",
"expires_at": null,
"description": "Pre-deployment backup",
"message": "Backup is being created. This may take several minutes depending on server size."
}
| 201 | காப்புப்பிரதி உருவாக்கம் வெற்றிகரமாக தொடங்கப்பட்டது. |
| 400 | தவறான கோரிக்கை - தவறான அளவுருக்கள் அல்லது தவறான கோரிக்கை |
| 401 | அங்கீகரிக்கப்படாதது - தவறான அங்கீகார டோக்கன் அல்லது காணவில்லை. |
| 404 | கிடைக்கவில்லை - சேவையகம் இல்லை. |
காப்புப்பிரதியை நிரந்தரமாக நீக்கவும். இந்தச் செயலைச் செயல்தவிர்க்க முடியாது.
| அளவுரு | வகை | அவசியம் | விளக்கம் |
|---|---|---|---|
backup_id |
integer | ஆம் | தனித்துவமான காப்புப்பிரதி ஐடி |
curl -X DELETE "https://admin.vps.org/api/v1/backups/501/" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json"
import requests
backup_id = 501
url = f"https://admin.vps.org/api/v1/backups/{backup_id}/"
headers = {
"Authorization": "Bearer YOUR_API_TOKEN",
"Content-Type": "application/json"
}
response = requests.delete(url, headers=headers)
print(response.status_code)
const backupId = 501;
const response = await fetch(`https://admin.vps.org/api/v1/backups/${backupId}/`, {
method: 'DELETE',
headers: {
'Authorization': 'Bearer YOUR_API_TOKEN',
'Content-Type': 'application/json'
}
});
console.log(response.status);
| 204 | காப்புப்பிரதி வெற்றிகரமாக நீக்கப்பட்டது. |
| 401 | அங்கீகரிக்கப்படாதது - தவறான அங்கீகார டோக்கன் அல்லது காணவில்லை. |
| 404 | கிடைக்கவில்லை - காப்புப்பிரதி இல்லை. |
காப்புப்பிரதியிலிருந்து ஒரு சேவையகத்தை மீட்டமைக்க, சேவையக API மீட்டெடுப்பு இறுதிப் புள்ளியைப் பயன்படுத்தவும்:
POST /api/v1/servers/{server_id}/restore/
{
"backup_id": 501
}
சேவையக மீட்டெடுப்பு பற்றிய விரிவான தகவலுக்கு, பார்க்கவும் சேவையக API ஆவணங்கள்.