---
title: "Projeler — API başvurusu"
description: "Hizmetlerinizi projelere ayırın (iş, müşteri ya da ortam başına). Her hizmet tek bir projededir; atanmamış hizmetler varsayılan projededir (id 0). Fat"
url: https://www.gyrohosting.com/developers/tr/api/projects.html
language: tr
openapi: https://www.gyrohosting.com/developers/openapi.json
api_version: 2.30.0
---

# Projeler

Hizmetlerinizi projelere ayırın (iş, müşteri ya da ortam başına). Her hizmet tek bir projededir; atanmamış hizmetler varsayılan projededir (id 0). Faturalar projeye göre bölünmez.

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


## GET /cloud/projects

**Projeleri listele** · operationId `listProjects` · scope `services_read` · OpenAPI fragment: https://www.gyrohosting.com/developers/spec/ops/listProjects.json

Projeleriniz; varsayılan proje (id 0) her zaman ilk sırada. Sayılar anahtarın hizmet kapsamına göredir.


### Yanıtlar

- **200**: Projects
- **401**: Missing, invalid or revoked key
- **403**: Key lacks the scope, IP not allowed, or feature disabled

### Örnekler

```bash
curl -s 'https://www.gyrohosting.com/api/v1/client/cloud/projects' \
  -H "Authorization: Bearer $GYRO_TOKEN"
```
```bash
gyro project list
```
```hcl
# kaynak gyro_project: https://registry.terraform.io/providers/gyro-hosting/gyro/latest/docs/resources/project
# A project per business / client / environment. Destroying it only deletes the project:
# its services go back to the default project (id 0).
resource "gyro_project" "gyroproje" {
  name        = "Gyro Proje"
  description = "Web + API + CDN"
  color       = "blue"
  icon        = "rocket-takeoff"
}

# New servers and load balancers can be ordered straight into a project.
resource "gyro_server" "web" {
  plan          = "standart-2-4"
  region        = "tr-ist-1"
  image         = "ubuntu-24.04"
  confirm_order = true
  project_id    = tonumber(gyro_project.gyroproje.id)
}
```
```python
import os, uuid, requests

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

**Proje oluştur** · operationId `createProject` · scope `services_write` · OpenAPI fragment: https://www.gyrohosting.com/developers/spec/ops/createProject.json

Hesap başına en çok 50 proje (409 `project_limit`). İsteğe bağlı `service_ids` hizmetleri hemen taşır. Yazma: anahtar başına dakikada 60 (429 `rate_limited`). Alt hesap anahtarları proje oluşturamaz, yeniden adlandıramaz, silemez (403 `subkey_forbidden`).


### İstek gövdesi

| Alan | Tür | Açıklama |
|---|---|---|
| `name` (zorunlu) | string | Letter or digit first; then letters, digits, space and . _ - / + # & ( ). Unique per account (case-insensitive). Reserved: Genel, General, Default. |
| `description` | string / null |  |
| `color` | string (gray, blue, green, red, orange, yellow, purple, pink, teal, indigo) |  |
| `icon` | string (folder, briefcase, building, cart3, cloud, code-slash, controller, globe2, heart, house, kanban, lightning, people, rocket-takeoff, shield-lock, shop, star, tools, truck, box-seam, mortarboard, camera) |  |
| `service_ids` | array<integer> | Optional: move these services into the new project at once |

### Yanıtlar

- **201**: Created
- **409**: name_taken / project_limit
- **422**: Validation error
- **401**: Missing, invalid or revoked key
- **403**: Key lacks the scope, IP not allowed, or feature disabled
- **404**: Not found — also returned for objects owned by someone else
- **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/projects' \
  -H "Authorization: Bearer $GYRO_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"name": "Gyro Proje", "color": "blue", "icon": "rocket-takeoff", "service_ids": [12345]}'
```
```bash
gyro project create --help    # tüm seçenekler
```
```hcl
# kaynak gyro_project: https://registry.terraform.io/providers/gyro-hosting/gyro/latest/docs/resources/project
# A project per business / client / environment. Destroying it only deletes the project:
# its services go back to the default project (id 0).
resource "gyro_project" "gyroproje" {
  name        = "Gyro Proje"
  description = "Web + API + CDN"
  color       = "blue"
  icon        = "rocket-takeoff"
}

# New servers and load balancers can be ordered straight into a project.
resource "gyro_server" "web" {
  plan          = "standart-2-4"
  region        = "tr-ist-1"
  image         = "ubuntu-24.04"
  confirm_order = true
  project_id    = tonumber(gyro_project.gyroproje.id)
}
```
```python
import os, uuid, requests

h = {"Authorization": "Bearer " + os.environ["GYRO_TOKEN"]}
r = requests.post("https://www.gyrohosting.com/api/v1/client/cloud/projects", headers=h, json={"name": "Gyro Proje", "color": "blue", "icon": "rocket-takeoff", "service_ids": [12345]}, timeout=60)
r.raise_for_status()
print(r.json()["data"])
```
```js
const res = await fetch("https://www.gyrohosting.com/api/v1/client/cloud/projects", {
  method: "POST",
  headers: {
    "Authorization": `Bearer ${process.env.GYRO_TOKEN}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({"name": "Gyro Proje", "color": "blue", "icon": "rocket-takeoff", "service_ids": [12345]}),
});
const { data, error } = await res.json();
if (!res.ok) throw new Error(`${error.code}: ${error.message}`);
```


## GET /cloud/projects/{id}

**Projeyi hizmet numaralarıyla getir** · operationId `getProject` · scope `services_read` · OpenAPI fragment: https://www.gyrohosting.com/developers/spec/ops/getProject.json

Başka hesabın projesi 404 `project_not_found` döner.


### Parametreler

| Alan | in | Tür | Açıklama |
|---|---|---|---|
| `id` (zorunlu) | path | integer | Project id (0 = default project) |

### Yanıtlar

- **200**: Project
- **401**: Missing, invalid or revoked key
- **403**: Key lacks the scope, IP not allowed, or feature disabled
- **404**: Not found — also returned for objects owned by someone else
- **429**: Too many requests (`rate_limited`); see the `Retry-After` and `X-RateLimit-*` headers

### Örnekler

```bash
curl -s 'https://www.gyrohosting.com/api/v1/client/cloud/projects/12345' \
  -H "Authorization: Bearer $GYRO_TOKEN"
```
```bash
gyro project get 12345
```
```hcl
# kaynak gyro_project: https://registry.terraform.io/providers/gyro-hosting/gyro/latest/docs/resources/project
# A project per business / client / environment. Destroying it only deletes the project:
# its services go back to the default project (id 0).
resource "gyro_project" "gyroproje" {
  name        = "Gyro Proje"
  description = "Web + API + CDN"
  color       = "blue"
  icon        = "rocket-takeoff"
}

# New servers and load balancers can be ordered straight into a project.
resource "gyro_server" "web" {
  plan          = "standart-2-4"
  region        = "tr-ist-1"
  image         = "ubuntu-24.04"
  confirm_order = true
  project_id    = tonumber(gyro_project.gyroproje.id)
}
```
```python
import os, uuid, requests

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


## PATCH /cloud/projects/{id}

**Projeyi yeniden adlandır / renklendir** · operationId `updateProject` · scope `services_write` · OpenAPI fragment: https://www.gyrohosting.com/developers/spec/ops/updateProject.json

name, description, color, icon alanlarından istediğinizi gönderin. Varsayılan proje değiştirilemez (409 `default_project`). Yazma: anahtar başına dakikada 60 (429 `rate_limited`). Alt hesap anahtarları proje oluşturamaz, yeniden adlandıramaz, silemez (403 `subkey_forbidden`).


### Parametreler

| Alan | in | Tür | Açıklama |
|---|---|---|---|
| `id` (zorunlu) | path | integer | Project id (0 = default project) |

### İstek gövdesi

| Alan | Tür | Açıklama |
|---|---|---|
| `name` | string | Letter or digit first; then letters, digits, space and . _ - / + # & ( ). Unique per account (case-insensitive). Reserved: Genel, General, Default. |
| `description` | string / null |  |
| `color` | string (gray, blue, green, red, orange, yellow, purple, pink, teal, indigo) |  |
| `icon` | string (folder, briefcase, building, cart3, cloud, code-slash, controller, globe2, heart, house, kanban, lightning, people, rocket-takeoff, shield-lock, shop, star, tools, truck, box-seam, mortarboard, camera) |  |

### Yanıtlar

- **200**: Updated
- **409**: name_taken / default_project
- **401**: Missing, invalid or revoked key
- **403**: Key lacks the scope, IP not allowed, or feature disabled
- **404**: Not found — also returned for objects owned by someone else
- **429**: Too many requests (`rate_limited`); see the `Retry-After` and `X-RateLimit-*` headers

### Örnekler

```bash
curl -s -X PATCH 'https://www.gyrohosting.com/api/v1/client/cloud/projects/12345' \
  -H "Authorization: Bearer $GYRO_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"name": "string", "description": "string", "color": "gray", "icon": "folder"}'
```
```bash
gyro project rename 12345 --help    # tüm seçenekler
```
```hcl
# kaynak gyro_project: https://registry.terraform.io/providers/gyro-hosting/gyro/latest/docs/resources/project
# A project per business / client / environment. Destroying it only deletes the project:
# its services go back to the default project (id 0).
resource "gyro_project" "gyroproje" {
  name        = "Gyro Proje"
  description = "Web + API + CDN"
  color       = "blue"
  icon        = "rocket-takeoff"
}

# New servers and load balancers can be ordered straight into a project.
resource "gyro_server" "web" {
  plan          = "standart-2-4"
  region        = "tr-ist-1"
  image         = "ubuntu-24.04"
  confirm_order = true
  project_id    = tonumber(gyro_project.gyroproje.id)
}
```
```python
import os, uuid, requests

h = {"Authorization": "Bearer " + os.environ["GYRO_TOKEN"]}
r = requests.patch("https://www.gyrohosting.com/api/v1/client/cloud/projects/12345", headers=h, json={"name": "string", "description": "string", "color": "gray", "icon": "folder"}, timeout=60)
r.raise_for_status()
print(r.json()["data"])
```
```js
const res = await fetch("https://www.gyrohosting.com/api/v1/client/cloud/projects/12345", {
  method: "PATCH",
  headers: {
    "Authorization": `Bearer ${process.env.GYRO_TOKEN}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({"name": "string", "description": "string", "color": "gray", "icon": "folder"}),
});
const { data, error } = await res.json();
if (!res.ok) throw new Error(`${error.code}: ${error.message}`);
```


## DELETE /cloud/projects/{id}

**Projeyi sil** · operationId `deleteProject` · scope `services_write` · OpenAPI fragment: https://www.gyrohosting.com/developers/spec/ops/deleteProject.json

Yalnız proje silinir: hizmetleri varsayılan projeye döner, başka hiçbir şey değişmez. Yazma: anahtar başına dakikada 60 (429 `rate_limited`). Alt hesap anahtarları proje oluşturamaz, yeniden adlandıramaz, silemez (403 `subkey_forbidden`).


### Parametreler

| Alan | in | Tür | Açıklama |
|---|---|---|---|
| `id` (zorunlu) | path | integer | Project id (0 = default project) |

### Yanıtlar

- **200**: Deleted
- **409**: default_project
- **401**: Missing, invalid or revoked key
- **403**: Key lacks the scope, IP not allowed, or feature disabled
- **404**: Not found — also returned for objects owned by someone else
- **429**: Too many requests (`rate_limited`); see the `Retry-After` and `X-RateLimit-*` headers

### Örnekler

```bash
curl -s -X DELETE 'https://www.gyrohosting.com/api/v1/client/cloud/projects/12345' \
  -H "Authorization: Bearer $GYRO_TOKEN"
```
```bash
gyro project delete 12345
```
```hcl
# kaynak gyro_project: https://registry.terraform.io/providers/gyro-hosting/gyro/latest/docs/resources/project
# A project per business / client / environment. Destroying it only deletes the project:
# its services go back to the default project (id 0).
resource "gyro_project" "gyroproje" {
  name        = "Gyro Proje"
  description = "Web + API + CDN"
  color       = "blue"
  icon        = "rocket-takeoff"
}

# New servers and load balancers can be ordered straight into a project.
resource "gyro_server" "web" {
  plan          = "standart-2-4"
  region        = "tr-ist-1"
  image         = "ubuntu-24.04"
  confirm_order = true
  project_id    = tonumber(gyro_project.gyroproje.id)
}
```
```python
import os, uuid, requests

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


## POST /cloud/projects/{id}/services

**Hizmetleri projeye taşı** · operationId `moveServicesToProject` · scope `services_write` · OpenAPI fragment: https://www.gyrohosting.com/developers/spec/ops/moveServicesToProject.json

Tüm numaralar anahtarın kapsamındaki hizmetleriniz olmalı, yoksa 404 `service_not_found` ve hiçbir şey taşınmaz. Çağrı başına en çok 500; id 0 = varsayılan proje. Alt hesap anahtarı `project:move` eylemi ister.


### Parametreler

| Alan | in | Tür | Açıklama |
|---|---|---|---|
| `id` (zorunlu) | path | integer | Project id (0 = default project) |

### İstek gövdesi

| Alan | Tür | Açıklama |
|---|---|---|
| `service_ids` (zorunlu) | array<integer> |  |

### Yanıtlar

- **200**: Moved
- **401**: Missing, invalid or revoked key
- **403**: Key lacks the scope, IP not allowed, or feature disabled
- **404**: Not found — also returned for objects owned by someone else
- **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/projects/12345/services' \
  -H "Authorization: Bearer $GYRO_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"service_ids": [12345, 12346]}'
```
```bash
gyro project move 12345 --help    # tüm seçenekler
```
```hcl
# kaynak gyro_project: https://registry.terraform.io/providers/gyro-hosting/gyro/latest/docs/resources/project
# A project per business / client / environment. Destroying it only deletes the project:
# its services go back to the default project (id 0).
resource "gyro_project" "gyroproje" {
  name        = "Gyro Proje"
  description = "Web + API + CDN"
  color       = "blue"
  icon        = "rocket-takeoff"
}

# New servers and load balancers can be ordered straight into a project.
resource "gyro_server" "web" {
  plan          = "standart-2-4"
  region        = "tr-ist-1"
  image         = "ubuntu-24.04"
  confirm_order = true
  project_id    = tonumber(gyro_project.gyroproje.id)
}
```
```python
import os, uuid, requests

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


## PUT /cloud/services/{id}/project

**Hizmetin projesini ayarla** · operationId `setServiceProject` · scope `services_write` · OpenAPI fragment: https://www.gyrohosting.com/developers/spec/ops/setServiceProject.json

`project_id` 0 = varsayılan proje. Hizmeti (`project` ile) döner. Alt hesap anahtarı `project:move` eylemi ister.


### Parametreler

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

### İstek gövdesi

| Alan | Tür | Açıklama |
|---|---|---|
| `project_id` (zorunlu) | integer |  |

### Yanıtlar

- **200**: Service
- **422**: project_id_required / invalid_project_id
- **401**: Missing, invalid or revoked key
- **403**: Key lacks the scope, IP not allowed, or feature disabled
- **404**: Not found — also returned for objects owned by someone else
- **429**: Too many requests (`rate_limited`); see the `Retry-After` and `X-RateLimit-*` headers

### Örnekler

```bash
curl -s -X PUT 'https://www.gyrohosting.com/api/v1/client/cloud/services/12345/project' \
  -H "Authorization: Bearer $GYRO_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"project_id": 1}'
```
```bash
gyro service project set 12345 --help    # tüm seçenekler
```
```hcl
# kaynak gyro_service_project: https://registry.terraform.io/providers/gyro-hosting/gyro/latest/docs/resources/service_project
# Put any existing service (DNS, storage, mail, containers, VDS ...) into a project.
resource "gyro_service_project" "dns" {
  service_id = 12345
  project_id = tonumber(gyro_project.gyroproje.id)
}
```
```python
import os, uuid, requests

h = {"Authorization": "Bearer " + os.environ["GYRO_TOKEN"]}
r = requests.put("https://www.gyrohosting.com/api/v1/client/cloud/services/12345/project", headers=h, json={"project_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/services/12345/project", {
  method: "PUT",
  headers: {
    "Authorization": `Bearer ${process.env.GYRO_TOKEN}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({"project_id": 1}),
});
const { data, error } = await res.json();
if (!res.ok) throw new Error(`${error.code}: ${error.message}`);
```
