---
title: "Yedekleme alanı — API başvurusu"
description: "Kesin kotalı SFTP yedekleme alanı: hesabınızdaki BİR sunucuya bağlıdır ve yalnız o sunucunun IPv4 adreslerinden erişilir (tr-ist-1). Sipariş, bağlantı"
url: https://www.gyrohosting.com/developers/tr/api/backup-space.html
language: tr
openapi: https://www.gyrohosting.com/developers/openapi.json
api_version: 2.44.0
---

# Yedekleme alanı

Kesin kotalı SFTP yedekleme alanı: hesabınızdaki BİR sunucuya bağlıdır ve yalnız o sunucunun IPv4 adreslerinden erişilir (tr-ist-1). Sipariş, bağlantı bilgisi, parola sıfırlama, başka sunucuya bağlama, iptal. Boyut değişimi genel paket değişikliği uçlarıyla yapılır.

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


## GET /cloud/backup-spaces/plans

**Yedekleme alanı paketlerini listele** · operationId `listBackupSpacePlans` · scope `cloud_read` · OpenAPI fragment: https://www.gyrohosting.com/developers/spec/ops/listBackupSpacePlans.json

Sipariş edilebilir boyutlar (50 GB - 1 TB), dönem başına fiyat (sabit EUR, KDV hariç; `list_amount` = üstü çizili liste fiyatı) ve `servers`: alanın bağlanabileceği hesap sunucuları. `plans` boşsa bu hesap henüz sipariş veremez. `available: false` = şu an kapasite yok.


### Yanıtlar

- **200**: OK
- **403**: Key lacks the scope, IP not allowed, or feature disabled
- **404**: Not found — also returned for objects owned by someone else

### Örnekler

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

h = {"Authorization": "Bearer " + os.environ["GYRO_TOKEN"]}
r = requests.get("https://www.gyrohosting.com/api/v1/client/cloud/backup-spaces/plans", 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/backup-spaces/plans", {
  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}`);
```


## GET /cloud/backup-spaces

**Yedekleme alanlarını listele** · operationId `listBackupSpaces` · scope `services_read` · OpenAPI fragment: https://www.gyrohosting.com/developers/spec/ops/listBackupSpaces.json

Hesabın yedekleme alanları (GET /cloud/services ile aynı süzgeç ve sayfalama; `product_line=backup_space`).


### Parametreler

| Alan | in | Tür | Açıklama |
|---|---|---|---|
| `status` | query | string | service status filter (active, suspended, cancelled …) |
| `page` | query | integer |  |
| `limit` | query | integer |  |

### Yanıtlar

- **200**: OK
- **403**: Key lacks the scope, IP not allowed, or feature disabled
- **404**: Not found — also returned for objects owned by someone else

### Örnekler

```bash
curl -s 'https://www.gyrohosting.com/api/v1/client/cloud/backup-spaces' \
  -H "Authorization: Bearer $GYRO_TOKEN"
```
```bash
gyro backup-space list
```
```hcl
# kaynak gyro_backup_space: https://registry.terraform.io/providers/gyro-hosting/gyro/latest/docs/resources/backup_space
# 100 GB SFTP backup space bound to a server of the account, billed monthly from the balance.
# Only the server's IPv4 addresses can connect (sftp -P 2201 <user>@<host>, write into /veri).
resource "gyro_backup_space" "yedek" {
  plan      = "100gb"
  cycle     = "monthly"
  server_id = 12345
  name      = "gyro-proje-yedek"

  # destroy deletes the space and every file in it (cannot be undone)
  lifecycle {
    prevent_destroy = true
  }
}

output "sftp" {
  value = "sftp -P ${gyro_backup_space.yedek.port} ${gyro_backup_space.yedek.user}@${gyro_backup_space.yedek.host}"
}

# password is sensitive: pass it to a secret store / configuration, never print it
# gyro_backup_space.yedek.password
```
```python
import os, uuid, requests

h = {"Authorization": "Bearer " + os.environ["GYRO_TOKEN"]}
r = requests.get("https://www.gyrohosting.com/api/v1/client/cloud/backup-spaces", 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/backup-spaces", {
  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/backup-spaces

**Yedekleme alanı sipariş et** · operationId `createBackupSpace` · scope `cloud_order` · OpenAPI fragment: https://www.gyrohosting.com/developers/spec/ops/createBackupSpace.json

TEK bir yedekleme alanı sipariş eder ve hesap bakiyesinden öder (kayıtlı kart asla). Alan `server_id` ile hesabınızdaki etkin bir sunucuya bağlanır (Gyro Bulut tr-ist-1, TR VDS, yönetilen ya da fiziksel); hesapta tek sunucu varsa gönderilmeyebilir. Yalnız o sunucunun IPv4 adresleri bağlanabilir (SFTP, port 2201). `cycle` dönemine göre ücretlendirilir (sabit EUR fiyat hesap para biriminde, KDV hariç) ve diğer hizmetler gibi bakiyeden yenilenir. Teklif için `"dry_run": true`; gerçek sipariş `"confirm": true` ve `Idempotency-Key` başlığı ister. Alan yaklaşık bir dakikada kurulur (`backup_space.state` `pending` -> `active`); parola `GET /cloud/backup-spaces/{id}/credentials` ile alınır. Hatalar: 402 `insufficient_balance`; 403 `not_available` (bu hesap için satışta değil), `orders_disabled`; 409 `server_required` (etkin sunucu yok), `capacity_unavailable`; 422 `confirm_required` (`quote` ile), `product_not_orderable`, `cycle_invalid`, `server_id_required`, `invalid_server`, `invalid_quantity`; 429 `daily_limit`.


### Parametreler

| Alan | in | Tür | Açıklama |
|---|---|---|---|
| `Idempotency-Key` (zorunlu) | header | string | Unique per logical request (e.g. a UUID). Replays within 24 hours return the stored answer. |

### İstek gövdesi

| Alan | Tür | Açıklama |
|---|---|---|
| `plan` | string | plan from GET /cloud/backup-spaces/plans (50gb, 100gb, 250gb, 500gb, 1tb) |
| `product_id` | integer | product id instead of plan |
| `cycle` | string (monthly, quarterly, semiannually, annually) | billing cycle |
| `server_id` | integer | server to bind the space to (optional when the account has one active server) |
| `name` | string | name (nickname) |
| `tags` | array<string> |  |
| `project_id` | integer / null | project (0 = default project) |
| `end_customer_id` | integer | reseller main key: assign to this end-customer |
| `confirm` | boolean |  |
| `dry_run` | boolean |  |

### Yanıtlar

- **201**: OK
- **403**: Key lacks the scope, IP not allowed, or feature disabled
- **404**: Not found — also returned for objects owned by someone else
- **200**: Dry-run quote (`dry_run`, `quote`)
- **402**: Account balance does not cover the order (`insufficient_balance`)
- **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` ...)
- **429**: Too many requests (`rate_limited`); see the `Retry-After` and `X-RateLimit-*` headers

### Örnekler

```bash
curl -s -X POST 'https://www.gyrohosting.com/api/v1/client/cloud/backup-spaces' \
  -H "Authorization: Bearer $GYRO_TOKEN" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{"plan": "100gb", "cycle": "monthly", "server_id": 12345, "name": "gyro-proje-yedek", "confirm": true}'
```
```bash
gyro backup-space create --help    # tüm seçenekler
```
```hcl
# kaynak gyro_backup_space: https://registry.terraform.io/providers/gyro-hosting/gyro/latest/docs/resources/backup_space
# 100 GB SFTP backup space bound to a server of the account, billed monthly from the balance.
# Only the server's IPv4 addresses can connect (sftp -P 2201 <user>@<host>, write into /veri).
resource "gyro_backup_space" "yedek" {
  plan      = "100gb"
  cycle     = "monthly"
  server_id = 12345
  name      = "gyro-proje-yedek"

  # destroy deletes the space and every file in it (cannot be undone)
  lifecycle {
    prevent_destroy = true
  }
}

output "sftp" {
  value = "sftp -P ${gyro_backup_space.yedek.port} ${gyro_backup_space.yedek.user}@${gyro_backup_space.yedek.host}"
}

# password is sensitive: pass it to a secret store / configuration, never print it
# gyro_backup_space.yedek.password
```
```python
import os, uuid, requests

h = {"Authorization": "Bearer " + os.environ["GYRO_TOKEN"]}
h["Idempotency-Key"] = str(uuid.uuid4())
r = requests.post("https://www.gyrohosting.com/api/v1/client/cloud/backup-spaces", headers=h, json={"plan": "100gb", "cycle": "monthly", "server_id": 12345, "name": "gyro-proje-yedek", "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/backup-spaces", {
  method: "POST",
  headers: {
    "Authorization": `Bearer ${process.env.GYRO_TOKEN}`,
    "Content-Type": "application/json",
    "Idempotency-Key": crypto.randomUUID(),
  },
  body: JSON.stringify({"plan": "100gb", "cycle": "monthly", "server_id": 12345, "name": "gyro-proje-yedek", "confirm": true}),
});
const { data, error } = await res.json();
if (!res.ok) throw new Error(`${error.code}: ${error.message}`);
```


## GET /cloud/backup-spaces/{id}

**Yedekleme alanı ayrıntısı** · operationId `getBackupSpace` · scope `services_read` · OpenAPI fragment: https://www.gyrohosting.com/developers/spec/ops/getBackupSpace.json

Hizmet satırı ve `backup_space`: SFTP adresi, port, kullanıcı, yazılabilir dizin, boyut, kullanım, bağlı sunucu, izinli IP'ler ve durum. Parola yoktur (/credentials).


### Parametreler

| Alan | in | Tür | Açıklama |
|---|---|---|---|
| `id` (zorunlu) | path | integer | Backup space (service) id |

### Yanıtlar

- **200**: OK
- **403**: Key lacks the scope, IP not allowed, or feature disabled
- **404**: Not found — also returned for objects owned by someone else

### Örnekler

```bash
curl -s 'https://www.gyrohosting.com/api/v1/client/cloud/backup-spaces/12345' \
  -H "Authorization: Bearer $GYRO_TOKEN"
```
```bash
gyro backup-space get 12345
```
```hcl
# kaynak gyro_backup_space: https://registry.terraform.io/providers/gyro-hosting/gyro/latest/docs/resources/backup_space
# 100 GB SFTP backup space bound to a server of the account, billed monthly from the balance.
# Only the server's IPv4 addresses can connect (sftp -P 2201 <user>@<host>, write into /veri).
resource "gyro_backup_space" "yedek" {
  plan      = "100gb"
  cycle     = "monthly"
  server_id = 12345
  name      = "gyro-proje-yedek"

  # destroy deletes the space and every file in it (cannot be undone)
  lifecycle {
    prevent_destroy = true
  }
}

output "sftp" {
  value = "sftp -P ${gyro_backup_space.yedek.port} ${gyro_backup_space.yedek.user}@${gyro_backup_space.yedek.host}"
}

# password is sensitive: pass it to a secret store / configuration, never print it
# gyro_backup_space.yedek.password
```
```python
import os, uuid, requests

h = {"Authorization": "Bearer " + os.environ["GYRO_TOKEN"]}
r = requests.get("https://www.gyrohosting.com/api/v1/client/cloud/backup-spaces/12345", 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/backup-spaces/12345", {
  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}`);
```


## DELETE /cloud/backup-spaces/{id}

**Yedekleme alanını iptal et (sil)** · operationId `deleteBackupSpace` · scope `cloud_delete` · OpenAPI fragment: https://www.gyrohosting.com/developers/spec/ops/deleteBackupSpace.json

`confirm=true` zorunlu. `immediate=true` hemen iptal eder: SFTP erişimi durur ve alan İÇİNDEKİ TÜM DOSYALARLA yaklaşık bir dakikada kalıcı olarak silinir (snapshot yok, bekleme süresi yok; geri alınamaz). `immediate` olmadan iptal talebi açılır, işlenene kadar alan çalışır. Anında silme operatörce kapatıldıysa 403 `immediate_disabled`.


### Parametreler

| Alan | in | Tür | Açıklama |
|---|---|---|---|
| `id` (zorunlu) | path | integer | Backup space (service) id |
| `confirm` (zorunlu) | query | boolean |  |
| `immediate` | query | boolean | delete the space and every file now (cannot be undone) |

### Yanıtlar

- **202**: OK
- **403**: Key lacks the scope, IP not allowed, or feature disabled
- **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 DELETE 'https://www.gyrohosting.com/api/v1/client/cloud/backup-spaces/12345' \
  -H "Authorization: Bearer $GYRO_TOKEN"
```
```bash
gyro backup-space delete 12345
```
```hcl
# kaynak gyro_backup_space: https://registry.terraform.io/providers/gyro-hosting/gyro/latest/docs/resources/backup_space
# 100 GB SFTP backup space bound to a server of the account, billed monthly from the balance.
# Only the server's IPv4 addresses can connect (sftp -P 2201 <user>@<host>, write into /veri).
resource "gyro_backup_space" "yedek" {
  plan      = "100gb"
  cycle     = "monthly"
  server_id = 12345
  name      = "gyro-proje-yedek"

  # destroy deletes the space and every file in it (cannot be undone)
  lifecycle {
    prevent_destroy = true
  }
}

output "sftp" {
  value = "sftp -P ${gyro_backup_space.yedek.port} ${gyro_backup_space.yedek.user}@${gyro_backup_space.yedek.host}"
}

# password is sensitive: pass it to a secret store / configuration, never print it
# gyro_backup_space.yedek.password
```
```python
import os, uuid, requests

h = {"Authorization": "Bearer " + os.environ["GYRO_TOKEN"]}
r = requests.delete("https://www.gyrohosting.com/api/v1/client/cloud/backup-spaces/12345", 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/backup-spaces/12345", {
  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/backup-spaces/{id}/credentials

**Parolayla SFTP bağlantı bilgisi** · operationId `getBackupSpaceCredentials` · scope `services_write` · OpenAPI fragment: https://www.gyrohosting.com/developers/spec/ops/getBackupSpaceCredentials.json

Adres, port, kullanıcı, dizin ve SFTP parolası (`Cache-Control: no-store`). Gizli değer gösterdiği için `services_write` ister. Alan kurulurken 409 `not_ready`.


### Parametreler

| Alan | in | Tür | Açıklama |
|---|---|---|---|
| `id` (zorunlu) | path | integer | Backup space (service) id |

### Yanıtlar

- **200**: OK
- **403**: Key lacks the scope, IP not allowed, or feature disabled
- **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`)

### Örnekler

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

h = {"Authorization": "Bearer " + os.environ["GYRO_TOKEN"]}
r = requests.get("https://www.gyrohosting.com/api/v1/client/cloud/backup-spaces/12345/credentials", 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/backup-spaces/12345/credentials", {
  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/backup-spaces/{id}/password

**SFTP parolasını sıfırla** · operationId `resetBackupSpacePassword` · scope `services_write` · OpenAPI fragment: https://www.gyrohosting.com/developers/spec/ops/resetBackupSpacePassword.json

Yeni rastgele parola üretir ve bir kez döndürür. Eski parola hemen geçersiz olur, açık SFTP oturumları kapanır; yedek işlerinizi güncelleyin. `"confirm": true` zorunlu. Alan etkin değilse 409 `not_actionable`; 502 `backend_unavailable` = birkaç dakika sonra yeniden deneyin.


### Parametreler

| Alan | in | Tür | Açıklama |
|---|---|---|---|
| `id` (zorunlu) | path | integer | Backup space (service) id |

### İstek gövdesi

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

### Yanıtlar

- **200**: OK
- **403**: Key lacks the scope, IP not allowed, or feature disabled
- **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/backup-spaces/12345/password' \
  -H "Authorization: Bearer $GYRO_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"confirm": true}'
```
```bash
gyro backup-space reset-password 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/backup-spaces/12345/password", 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/backup-spaces/12345/password", {
  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}`);
```


## PUT /cloud/backup-spaces/{id}/server

**Alanı başka sunucuya bağla** · operationId `attachBackupSpaceServer` · scope `services_write` · OpenAPI fragment: https://www.gyrohosting.com/developers/spec/ops/attachBackupSpaceServer.json

Alanı `server_id` sunucusuna bağlar (hesabınızdaki etkin sunuculardan biri; tek sunucu varsa isteğe bağlı). Bundan sonra yalnız o sunucunun IPv4 adresleri bağlanabilir; önceki sunucunun erişimi hemen kapanır. Dosyalara dokunulmaz. Bağlı sunucunun IP'si değişir ya da sunucu iptal edilirse erişim kendiliğinden eşitlenir.


### Parametreler

| Alan | in | Tür | Açıklama |
|---|---|---|---|
| `id` (zorunlu) | path | integer | Backup space (service) id |

### İstek gövdesi

| Alan | Tür | Açıklama |
|---|---|---|
| `server_id` | integer | server id |

### Yanıtlar

- **200**: OK
- **403**: Key lacks the scope, IP not allowed, or feature disabled
- **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 PUT 'https://www.gyrohosting.com/api/v1/client/cloud/backup-spaces/12345/server' \
  -H "Authorization: Bearer $GYRO_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"server_id": 1}'
```
```bash
gyro backup-space attach-server 12345 --help    # tüm seçenekler
```
```hcl
# kaynak gyro_backup_space: https://registry.terraform.io/providers/gyro-hosting/gyro/latest/docs/resources/backup_space
# 100 GB SFTP backup space bound to a server of the account, billed monthly from the balance.
# Only the server's IPv4 addresses can connect (sftp -P 2201 <user>@<host>, write into /veri).
resource "gyro_backup_space" "yedek" {
  plan      = "100gb"
  cycle     = "monthly"
  server_id = 12345
  name      = "gyro-proje-yedek"

  # destroy deletes the space and every file in it (cannot be undone)
  lifecycle {
    prevent_destroy = true
  }
}

output "sftp" {
  value = "sftp -P ${gyro_backup_space.yedek.port} ${gyro_backup_space.yedek.user}@${gyro_backup_space.yedek.host}"
}

# password is sensitive: pass it to a secret store / configuration, never print it
# gyro_backup_space.yedek.password
```
```python
import os, uuid, requests

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