OpenAPI Türkçe gyrohosting.com ↗

Projects

Group your services into projects (e.g. one per business, client or environment). Every service is in exactly one project; services without one are in the default project (id 0). Invoices are not split by project.

#GET/cloud/projects

List projectsScope: services_readlistProjectsOpenAPI for this operation

Your projects; the default project (id 0) is always first. Counts follow the key's service scope.

Responses

200Projects — data: array<Project>
401Missing, invalid or revoked key
403Key lacks the scope, IP not allowed, or feature disabled

Examples

curl -s 'https://www.gyrohosting.com/api/v1/client/cloud/projects' \
  -H "Authorization: Bearer $GYRO_TOKEN"
gyro project list
# resource 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)
}
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"])
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

Create a projectScope: services_writecreateProjectOpenAPI for this operation

At most 50 projects per account (409 project_limit). Optional service_ids move services in at once. Writes: 60 per minute per key (429 rate_limited). Sub-account keys cannot create, rename or delete projects (403 subkey_forbidden). Errors: 422 invalid_name, name_reserved, invalid_color, invalid_icon, invalid_description, invalid_service_ids; 409 name_taken; 404 service_not_found.

Request body

FieldTypeDescription
name requiredstringLetter or digit first; then letters, digits, space and . _ - / + # & ( ). Unique per account (case-insensitive). Reserved: Genel, General, Default.
descriptionstring | null
colorstring (gray, blue, green, red, orange, yellow, purple, pink, teal, indigo)
iconstring (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_idsarray<integer>Optional: move these services into the new project at once

Responses

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

Examples

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]}'
gyro project create --help    # all flags
# resource 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)
}
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"])
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}

Get a project with its service idsScope: services_readgetProjectOpenAPI for this operation

Another account's project answers 404 project_not_found.

Parameters

FieldinTypeDescription
id requiredpathintegerProject id (0 = default project)

Responses

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

Examples

curl -s 'https://www.gyrohosting.com/api/v1/client/cloud/projects/12345' \
  -H "Authorization: Bearer $GYRO_TOKEN"
gyro project get 12345
# resource 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)
}
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"])
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}

Rename / recolour a projectScope: services_writeupdateProjectOpenAPI for this operation

Send any of name, description, color, icon. The default project cannot be changed (409 default_project). Writes: 60 per minute per key (429 rate_limited). Sub-account keys cannot create, rename or delete projects (403 subkey_forbidden).

Parameters

FieldinTypeDescription
id requiredpathintegerProject id (0 = default project)

Request body

FieldTypeDescription
namestringLetter or digit first; then letters, digits, space and . _ - / + # & ( ). Unique per account (case-insensitive). Reserved: Genel, General, Default.
descriptionstring | null
colorstring (gray, blue, green, red, orange, yellow, purple, pink, teal, indigo)
iconstring (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)

Responses

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

Examples

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"}'
gyro project rename 12345 --help    # all flags
# resource 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)
}
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"])
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}

Delete a projectScope: services_writedeleteProjectOpenAPI for this operation

Only the project is deleted: its services go back to the default project, nothing else changes. Writes: 60 per minute per key (429 rate_limited). Sub-account keys cannot create, rename or delete projects (403 subkey_forbidden).

Parameters

FieldinTypeDescription
id requiredpathintegerProject id (0 = default project)

Responses

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

Examples

curl -s -X DELETE 'https://www.gyrohosting.com/api/v1/client/cloud/projects/12345' \
  -H "Authorization: Bearer $GYRO_TOKEN"
gyro project delete 12345
# resource 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)
}
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"])
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

Move services into a projectScope: services_writemoveServicesToProjectOpenAPI for this operation

All ids must be your services within the key's scope, else 404 service_not_found and nothing moves. Up to 500 per call; id 0 = default project. Sub-account keys need the project:move action. Writes: 60 per minute per key (429 rate_limited).

Parameters

FieldinTypeDescription
id requiredpathintegerProject id (0 = default project)

Request body

FieldTypeDescription
service_ids requiredarray<integer>

Responses

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

Examples

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]}'
gyro project move 12345 --help    # all flags
# resource 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)
}
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"])
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

Set the project of a serviceScope: services_writesetServiceProjectOpenAPI for this operation

project_id 0 = default project. Answers the service (with project). Sub-account keys need the project:move action.

Parameters

FieldinTypeDescription
id requiredpathintegerService id

Request body

FieldTypeDescription
project_id requiredinteger

Responses

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

Examples

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}'
gyro service project set 12345 --help    # all flags
# resource 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)
}
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"])
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}`);