OpenAPI Türkçe gyrohosting.com ↗

Services (all products)

Generic bridge to every product line (cloud server, VDS, dedicated, mail, monitor, storage, license, ...). Everything a customer can do on a service in the client area is a module tool or method and is reachable here. Start with GET /cloud/services/{id}/tools: it lists the tools, their actions and our safety policy (read, confirm, secret) for that very service.

#GET/cloud/services

List services of every product lineScope: services_readlistServicesOpenAPI for this operation

Parameters

FieldinTypeDescription
product_linequerystring (cloud_server, vds, dedicated_server, mail, monitor, storage, license, app)
statusquerystring
customer_idqueryintegerReseller main key only
pagequeryinteger
limitqueryinteger
projectqueryintegerOnly services in this project (0 = default project). Unknown project: 404 project_not_found.

Responses

200Services — data: array<Service>
401Missing, invalid or revoked key

Examples

curl -s 'https://www.gyrohosting.com/api/v1/client/cloud/services' \
  -H "Authorization: Bearer $GYRO_TOKEN"
gyro service list
# data source gyro_services: https://registry.terraform.io/providers/gyro-hosting/gyro/latest/docs/data-sources/services
data "gyro_services" "mail" {
  product_line = "mail"
}
import os, uuid, requests

h = {"Authorization": "Bearer " + os.environ["GYRO_TOKEN"]}
r = requests.get("https://www.gyrohosting.com/api/v1/client/cloud/services", headers=h, timeout=60)
r.raise_for_status()
print(r.json()["data"])
const res = await fetch("https://www.gyrohosting.com/api/v1/client/cloud/services", {
  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/services/{id}

Get a service (renewal, cancellation, access details)Scope: services_readgetServiceOpenAPI for this operation

Parameters

FieldinTypeDescription
id requiredpathinteger

Responses

200Service — data: Service
404Not found — also returned for objects owned by someone else

Examples

curl -s 'https://www.gyrohosting.com/api/v1/client/cloud/services/12345' \
  -H "Authorization: Bearer $GYRO_TOKEN"
gyro service get 12345
import os, uuid, requests

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

#GET/cloud/services/{id}/tools

Discover tools, actions and safety policy of a serviceScope: services_readlistServiceToolsOpenAPI for this operation

Parameters

FieldinTypeDescription
id requiredpathinteger

Responses

200Tools — data: ServiceTools
404Not found — also returned for objects owned by someone else
409State conflict (server_locked, not_actionable, ssh_key_exists, server_limit, idempotency_in_flight)

Examples

curl -s 'https://www.gyrohosting.com/api/v1/client/cloud/services/12345/tools' \
  -H "Authorization: Bearer $GYRO_TOKEN"
gyro service tool list 12345
import os, uuid, requests

h = {"Authorization": "Bearer " + os.environ["GYRO_TOKEN"]}
r = requests.get("https://www.gyrohosting.com/api/v1/client/cloud/services/12345/tools", headers=h, timeout=60)
r.raise_for_status()
print(r.json()["data"])
const res = await fetch("https://www.gyrohosting.com/api/v1/client/cloud/services/12345/tools", {
  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/services/{id}/tools/{tool}

Read a tool (list mailboxes, snapshots, DNS records, ...)Scope: services_readgetServiceToolDataOpenAPI for this operation

Parameters

FieldinTypeDescription
id requiredpathinteger
tool requiredpathstring

Responses

200Tool data (module specific) — data: object
404Not found — also returned for objects owned by someone else

Examples

curl -s 'https://www.gyrohosting.com/api/v1/client/cloud/services/12345/tools/1' \
  -H "Authorization: Bearer $GYRO_TOKEN"
gyro service tool get 12345
import os, uuid, requests

h = {"Authorization": "Bearer " + os.environ["GYRO_TOKEN"]}
r = requests.get("https://www.gyrohosting.com/api/v1/client/cloud/services/12345/tools/1", headers=h, timeout=60)
r.raise_for_status()
print(r.json()["data"])
const res = await fetch("https://www.gyrohosting.com/api/v1/client/cloud/services/12345/tools/1", {
  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/services/{id}/tools/{tool}/{action}

Run a tool action (create a mailbox, restore a snapshot, ...)Scope: services_writerunServiceToolActionOpenAPI for this operation

Body fields are the tool's own fields (see the tool data and the per-module table in the guide). Actions flagged confirm in the discovery answer need "confirm": true.

Parameters

FieldinTypeDescription
id requiredpathinteger
tool requiredpathstring
action requiredpathstring

Request body

FieldTypeDescription
confirmboolean

Responses

202Accepted — data: object
404Not found — also returned for objects owned by someone else
409State conflict (server_locked, not_actionable, ssh_key_exists, server_limit, idempotency_in_flight)
422Validation or business rule failure (confirm_required, invalid_image, tool_action_failed ...)

Examples

curl -s -X POST 'https://www.gyrohosting.com/api/v1/client/cloud/services/12345/tools/1/reboot' \
  -H "Authorization: Bearer $GYRO_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"email": "[email protected]", "password": "S3cure-pass!", "quota": 2048}'
gyro service tool run 12345 --help    # all flags
import os, uuid, requests

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

#POST/cloud/services/{id}/methods/{method}

Call a client-callable module method (e.g. license change_ip)Scope: services_writecallServiceMethodOpenAPI for this operation

Parameters

FieldinTypeDescription
id requiredpathinteger
method requiredpathstring

Request body

FieldTypeDescription

Responses

200Result — data: object
404Not found — also returned for objects owned by someone else
422Validation or business rule failure (confirm_required, invalid_image, tool_action_failed ...)

Examples

curl -s -X POST 'https://www.gyrohosting.com/api/v1/client/cloud/services/12345/methods/1' \
  -H "Authorization: Bearer $GYRO_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"ip": "203.0.113.10"}'
gyro service method call 12345 --help    # all flags
import os, uuid, requests

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

#GET/cloud/services/{id}/label

Get the nickname and tags of a serviceScope: services_readgetServiceLabelOpenAPI for this operation

Customer-defined nickname and colour tags of one of your services (any product line). A service without a label answers "nickname": null and "tags": []. Labels are private to the service owner; after a transfer the old owner's label is not shown.

Parameters

FieldinTypeDescription
id requiredpathintegerService id

Responses

200Label — data: ServiceLabel
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/services/12345/label' \
  -H "Authorization: Bearer $GYRO_TOKEN"
gyro service label get 12345
# resource gyro_service_label: https://registry.terraform.io/providers/gyro-hosting/gyro/latest/docs/resources/service_label
# Give any service a nickname and colour tags. The nickname becomes the service title in the
# client area; the product name and service number stay below it.
resource "gyro_server" "api" {
  plan          = "standart-2-4"
  region        = "tr-ist-1"
  image         = "ubuntu-24.04"
  confirm_order = true
}

resource "gyro_service_label" "api" {
  service_id = tonumber(gyro_server.api.id)
  nickname   = "api-gateway"
  tags = [
    { name = "production", color = "green" },
    { name = "api" }, # colour omitted: a stable default is chosen by the API
  ]
}

# An existing service (e.g. a container environment) by its number.
resource "gyro_service_label" "ecs" {
  service_id = 12345
  nickname   = "gyro-ecs-1"
  tags       = [{ name = "staging", color = "orange" }]
}
import os, uuid, requests

h = {"Authorization": "Bearer " + os.environ["GYRO_TOKEN"]}
r = requests.get("https://www.gyrohosting.com/api/v1/client/cloud/services/12345/label", headers=h, timeout=60)
r.raise_for_status()
print(r.json()["data"])
const res = await fetch("https://www.gyrohosting.com/api/v1/client/cloud/services/12345/label", {
  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}`);

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

Set the nickname and/or tags of a serviceScope: services_writeupdateServiceLabelOpenAPI for this operation

Send nickname, tags or both; a field that is not sent stays unchanged. nickname "" or null clears it; tags replaces all tags and [] clears them. A tag is "name" or {"name", "color"}; an unknown or missing colour gets a stable default. Duplicate names (case-insensitive) are merged. Limit: 30 label writes per minute per key (429 rate_limited). Sub-account keys need the label:edit action. Errors: 422 nothing_to_update, invalid_nickname, invalid_tags; 404 service_not_found (also for services of other accounts) or feature_unavailable.

Parameters

FieldinTypeDescription
id requiredpathintegerService id

Request body

FieldTypeDescription
nicknamestring | null"" or null clears the nickname. No control characters.
tagsarray | nullReplaces all tags; [] or null clears them. Item: a tag name, or {"name", "color"} (CLI: use --data for colours).

Responses

200Saved label — data: ServiceLabel
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
422Validation or business rule failure (confirm_required, invalid_image, tool_action_failed ...)
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/label' \
  -H "Authorization: Bearer $GYRO_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"nickname": "Accounting server", "tags": [{"name": "production", "color": "green"}, "customer-A"]}'
gyro service label set 12345 --help    # all flags
# resource gyro_service_label: https://registry.terraform.io/providers/gyro-hosting/gyro/latest/docs/resources/service_label
# Give any service a nickname and colour tags. The nickname becomes the service title in the
# client area; the product name and service number stay below it.
resource "gyro_server" "api" {
  plan          = "standart-2-4"
  region        = "tr-ist-1"
  image         = "ubuntu-24.04"
  confirm_order = true
}

resource "gyro_service_label" "api" {
  service_id = tonumber(gyro_server.api.id)
  nickname   = "api-gateway"
  tags = [
    { name = "production", color = "green" },
    { name = "api" }, # colour omitted: a stable default is chosen by the API
  ]
}

# An existing service (e.g. a container environment) by its number.
resource "gyro_service_label" "ecs" {
  service_id = 12345
  nickname   = "gyro-ecs-1"
  tags       = [{ name = "staging", color = "orange" }]
}
import os, uuid, requests

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