---
title: "Snapshot ve yedekler — API başvurusu"
description: "Sunucu diskinin anlık görüntüleri. Snapshot alanı GB cinsinden ek hizmet kotasıdır."
url: https://www.gyrohosting.com/developers/tr/api/snapshots-and-backups.html
language: tr
openapi: https://www.gyrohosting.com/developers/openapi.json
api_version: 2.30.0
---

# Snapshot ve yedekler

Sunucu diskinin anlık görüntüleri. Snapshot alanı GB cinsinden ek hizmet kotasıdır.

Base URL: `https://www.gyrohosting.com/api/v1/client` · OpenAPI: https://www.gyrohosting.com/developers/openapi.json


## GET /cloud/servers/{id}/snapshots

**Snapshot'ları ve kotayı listele** · operationId `listSnapshots` · scope `cloud_read` · OpenAPI fragment: https://www.gyrohosting.com/developers/spec/ops/listSnapshots.json

**Ücret (tr-ist-1, ön ödemeli):** ilk snapshot ücretsizdir; her ek snapshot ayrı saatlik kalemdir ve dakikalar içinde silinse de **en az 1 saat** ücretlenir (en eski snapshot ücretsiz sayılır). 


### Parametreler

| Alan | in | Tür | Açıklama |
|---|---|---|---|
| `id` (zorunlu) | path | integer | Server id (= service id in the client area) |

### Yanıtlar

- **200**: Snapshots
- **404**: Not found — also returned for objects owned by someone else

### Örnekler

```bash
curl -s 'https://www.gyrohosting.com/api/v1/client/cloud/servers/12345/snapshots' \
  -H "Authorization: Bearer $GYRO_TOKEN"
```
```bash
gyro server snapshot list 12345
```
```python
import os, uuid, requests

h = {"Authorization": "Bearer " + os.environ["GYRO_TOKEN"]}
r = requests.get("https://www.gyrohosting.com/api/v1/client/cloud/servers/12345/snapshots", headers=h, timeout=60)
r.raise_for_status()
print(r.json()["data"])
```
```js
const res = await fetch("https://www.gyrohosting.com/api/v1/client/cloud/servers/12345/snapshots", {
  method: "GET",
  headers: {
    "Authorization": `Bearer ${process.env.GYRO_TOKEN}`,
  },
});
const { data, error } = await res.json();
if (!res.ok) throw new Error(`${error.code}: ${error.message}`);
```


## POST /cloud/servers/{id}/snapshots

**Snapshot al** · operationId `createSnapshot` · scope `cloud_write` · OpenAPI fragment: https://www.gyrohosting.com/developers/spec/ops/createSnapshot.json

**Ücret (tr-ist-1, ön ödemeli):** ilk snapshot ücretsizdir; her ek snapshot ayrı saatlik kalemdir ve dakikalar içinde silinse de **en az 1 saat** ücretlenir (en eski snapshot ücretsiz sayılır). 


### Parametreler

| Alan | in | Tür | Açıklama |
|---|---|---|---|
| `id` (zorunlu) | path | integer | Server id (= service id in the client area) |

### Yanıtlar

- **202**: Snapshot is being created (poll the list until status is available)
- **404**: Not found — also returned for objects owned by someone else
- **409**: State conflict (`server_locked`, `not_actionable`, `ssh_key_exists`, `server_limit`, `idempotency_in_flight`)
- **422**: Validation or business rule failure (`confirm_required`, `invalid_image`, `tool_action_failed` ...)

### Örnekler

```bash
curl -s -X POST 'https://www.gyrohosting.com/api/v1/client/cloud/servers/12345/snapshots' \
  -H "Authorization: Bearer $GYRO_TOKEN"
```
```bash
gyro server snapshot create 12345
```
```python
import os, uuid, requests

h = {"Authorization": "Bearer " + os.environ["GYRO_TOKEN"]}
r = requests.post("https://www.gyrohosting.com/api/v1/client/cloud/servers/12345/snapshots", headers=h, timeout=60)
r.raise_for_status()
print(r.json()["data"])
```
```js
const res = await fetch("https://www.gyrohosting.com/api/v1/client/cloud/servers/12345/snapshots", {
  method: "POST",
  headers: {
    "Authorization": `Bearer ${process.env.GYRO_TOKEN}`,
  },
});
const { data, error } = await res.json();
if (!res.ok) throw new Error(`${error.code}: ${error.message}`);
```


## POST /cloud/servers/{id}/snapshots/{sid}/restore

**Snapshot'ı sunucuya geri yükle (diski ezer)** · operationId `restoreSnapshot` · scope `cloud_write` · OpenAPI fragment: https://www.gyrohosting.com/developers/spec/ops/restoreSnapshot.json




### Parametreler

| Alan | in | Tür | Açıklama |
|---|---|---|---|
| `id` (zorunlu) | path | integer | Server id (= service id in the client area) |
| `sid` (zorunlu) | path | integer |  |

### İstek gövdesi

| Alan | Tür | Açıklama |
|---|---|---|
| `confirm` (zorunlu) | boolean = true |  |

### Yanıtlar

- **202**: Accepted
- **404**: Not found — also returned for objects owned by someone else
- **422**: Validation or business rule failure (`confirm_required`, `invalid_image`, `tool_action_failed` ...)

### Örnekler

```bash
curl -s -X POST 'https://www.gyrohosting.com/api/v1/client/cloud/servers/12345/snapshots/123/restore' \
  -H "Authorization: Bearer $GYRO_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"confirm": true}'
```
```bash
gyro server snapshot restore 12345 --help    # tüm seçenekler
```
```python
import os, uuid, requests

h = {"Authorization": "Bearer " + os.environ["GYRO_TOKEN"]}
r = requests.post("https://www.gyrohosting.com/api/v1/client/cloud/servers/12345/snapshots/123/restore", headers=h, json={"confirm": True}, timeout=60)
r.raise_for_status()
print(r.json()["data"])
```
```js
const res = await fetch("https://www.gyrohosting.com/api/v1/client/cloud/servers/12345/snapshots/123/restore", {
  method: "POST",
  headers: {
    "Authorization": `Bearer ${process.env.GYRO_TOKEN}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({"confirm": true}),
});
const { data, error } = await res.json();
if (!res.ok) throw new Error(`${error.code}: ${error.message}`);
```


## DELETE /cloud/servers/{id}/snapshots/{sid}

**Snapshot sil** · operationId `deleteSnapshot` · scope `cloud_write` · OpenAPI fragment: https://www.gyrohosting.com/developers/spec/ops/deleteSnapshot.json

**Ücret (tr-ist-1, ön ödemeli):** ilk snapshot ücretsizdir; her ek snapshot ayrı saatlik kalemdir ve dakikalar içinde silinse de **en az 1 saat** ücretlenir (en eski snapshot ücretsiz sayılır). 


### Parametreler

| Alan | in | Tür | Açıklama |
|---|---|---|---|
| `id` (zorunlu) | path | integer | Server id (= service id in the client area) |
| `sid` (zorunlu) | path | integer |  |

### Yanıtlar

- **202**: Accepted
- **404**: Not found — also returned for objects owned by someone else

### Örnekler

```bash
curl -s -X DELETE 'https://www.gyrohosting.com/api/v1/client/cloud/servers/12345/snapshots/123' \
  -H "Authorization: Bearer $GYRO_TOKEN"
```
```bash
gyro server snapshot delete 12345
```
```python
import os, uuid, requests

h = {"Authorization": "Bearer " + os.environ["GYRO_TOKEN"]}
r = requests.delete("https://www.gyrohosting.com/api/v1/client/cloud/servers/12345/snapshots/123", headers=h, timeout=60)
r.raise_for_status()
print(r.json()["data"])
```
```js
const res = await fetch("https://www.gyrohosting.com/api/v1/client/cloud/servers/12345/snapshots/123", {
  method: "DELETE",
  headers: {
    "Authorization": `Bearer ${process.env.GYRO_TOKEN}`,
  },
});
const { data, error } = await res.json();
if (!res.ok) throw new Error(`${error.code}: ${error.message}`);
```


## GET /cloud/servers/{id}/backups

**Otomatik yedekleri listele** · operationId `listBackups` · scope `cloud_read` · OpenAPI fragment: https://www.gyrohosting.com/developers/spec/ops/listBackups.json




### Parametreler

| Alan | in | Tür | Açıklama |
|---|---|---|---|
| `id` (zorunlu) | path | integer | Server id (= service id in the client area) |

### Yanıtlar

- **200**: Backups (enabled=false when the backup add-on is not active)
- **404**: Not found — also returned for objects owned by someone else

### Örnekler

```bash
curl -s 'https://www.gyrohosting.com/api/v1/client/cloud/servers/12345/backups' \
  -H "Authorization: Bearer $GYRO_TOKEN"
```
```bash
gyro server backup list 12345
```
```python
import os, uuid, requests

h = {"Authorization": "Bearer " + os.environ["GYRO_TOKEN"]}
r = requests.get("https://www.gyrohosting.com/api/v1/client/cloud/servers/12345/backups", headers=h, timeout=60)
r.raise_for_status()
print(r.json()["data"])
```
```js
const res = await fetch("https://www.gyrohosting.com/api/v1/client/cloud/servers/12345/backups", {
  method: "GET",
  headers: {
    "Authorization": `Bearer ${process.env.GYRO_TOKEN}`,
  },
});
const { data, error } = await res.json();
if (!res.ok) throw new Error(`${error.code}: ${error.message}`);
```


## POST /cloud/servers/{id}/backups

**Elle yedek al (yedekleme ek hizmeti gerekir)** · operationId `createBackup` · scope `cloud_write` · OpenAPI fragment: https://www.gyrohosting.com/developers/spec/ops/createBackup.json




### Parametreler

| Alan | in | Tür | Açıklama |
|---|---|---|---|
| `id` (zorunlu) | path | integer | Server id (= service id in the client area) |

### Yanıtlar

- **202**: Accepted
- **404**: Not found — also returned for objects owned by someone else
- **422**: Validation or business rule failure (`confirm_required`, `invalid_image`, `tool_action_failed` ...)

### Örnekler

```bash
curl -s -X POST 'https://www.gyrohosting.com/api/v1/client/cloud/servers/12345/backups' \
  -H "Authorization: Bearer $GYRO_TOKEN"
```
```bash
gyro server backup create 12345
```
```python
import os, uuid, requests

h = {"Authorization": "Bearer " + os.environ["GYRO_TOKEN"]}
r = requests.post("https://www.gyrohosting.com/api/v1/client/cloud/servers/12345/backups", headers=h, timeout=60)
r.raise_for_status()
print(r.json()["data"])
```
```js
const res = await fetch("https://www.gyrohosting.com/api/v1/client/cloud/servers/12345/backups", {
  method: "POST",
  headers: {
    "Authorization": `Bearer ${process.env.GYRO_TOKEN}`,
  },
});
const { data, error } = await res.json();
if (!res.ok) throw new Error(`${error.code}: ${error.message}`);
```
