OpenAPI Türkçe gyrohosting.com ↗

Object storage

Typed S3 storage shortcuts: buckets, access keys (secret shown once), usage, connection details.

#GET/cloud/storage/{id}/buckets

GET buckets (GyroDepolama)Scope: services_readtyped_get_storage__id__bucketsOpenAPI for this operation

Typed shortcut of the generic bridge: tool buckets. Body fields are the tool's own fields. Each item has s3_name (2.20.0): the name to use in S3 clients. Equal to name on Object Storage; on Protected Storage it stays the original name after a rename.

Parameters

FieldinTypeDescription
id requiredpathintegerService id

Responses

200Tool data / result — 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 'https://www.gyrohosting.com/api/v1/client/cloud/storage/12345/buckets' \
  -H "Authorization: Bearer $GYRO_TOKEN"
gyro api request GET /cloud/storage/12345/buckets
# resource gyro_storage_bucket: https://registry.terraform.io/providers/gyro-hosting/gyro/latest/docs/resources/storage_bucket
resource "gyro_storage_bucket" "assets" {
  service_id = 456
  name       = "assets"
}

# Protected Storage: versioned bucket with object lock (WORM).
# The real bucket name is "archive-<service code>": use full_name in S3 clients and other resources.
resource "gyro_storage_bucket" "archive" {
  service_id  = 789
  name        = "archive"
  object_lock = true
}
import os, uuid, requests

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

Create a bucketScope: services_writetyped_post_storage__id__bucketsOpenAPI for this operation

Creates a bucket. Object Storage: the name is private to the service. Protected Storage: every bucket is versioned and the name gets the service code suffix (<name>-<code>); object_lock: true creates a WORM bucket (needs a free locked-bucket right: Object Lock add-on, see GET /cloud/storage/{id}/object-lock). Object lock can only be chosen at creation and never turned off. object_lock: true on a standard Object Storage service answers 409 feature_not_available. Needs "confirm": true.

Parameters

FieldinTypeDescription
id requiredpathintegerService id

Request body

FieldTypeDescription
bucket requiredstringBucket name (3-58, lowercase letters, digits, -)
object_lockbooleanProtected Storage only: create with object lock (WORM). Cannot be changed later
confirmboolean

Responses

202Tool data / result — 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/storage/12345/buckets' \
  -H "Authorization: Bearer $GYRO_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"bucket": "string", "object_lock": true, "confirm": true}'
gyro api request POST /cloud/storage/12345/buckets --data '{"bucket": "string", "object_lock": true, "confirm": true}'
# resource gyro_storage_bucket: https://registry.terraform.io/providers/gyro-hosting/gyro/latest/docs/resources/storage_bucket
resource "gyro_storage_bucket" "assets" {
  service_id = 456
  name       = "assets"
}

# Protected Storage: versioned bucket with object lock (WORM).
# The real bucket name is "archive-<service code>": use full_name in S3 clients and other resources.
resource "gyro_storage_bucket" "archive" {
  service_id  = 789
  name        = "archive"
  object_lock = true
}
import os, uuid, requests

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

#DELETE/cloud/storage/{id}/buckets/{bucket}

DELETE buckets:delete (GyroDepolama)Scope: services_writetyped_delete_storage__id__buckets__bucketOpenAPI for this operation

Typed shortcut of the generic bridge: tool buckets, action delete. Body fields are the tool's own fields. Needs "confirm": true.

Parameters

FieldinTypeDescription
id requiredpathintegerService id
bucket requiredpathstring

Request body

FieldTypeDescription
confirmboolean

Responses

202Tool data / result — 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 DELETE 'https://www.gyrohosting.com/api/v1/client/cloud/storage/12345/buckets/1' \
  -H "Authorization: Bearer $GYRO_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"confirm": true}'
gyro api request DELETE /cloud/storage/12345/buckets/1 --data '{"confirm": true}'
# resource gyro_storage_bucket: https://registry.terraform.io/providers/gyro-hosting/gyro/latest/docs/resources/storage_bucket
resource "gyro_storage_bucket" "assets" {
  service_id = 456
  name       = "assets"
}

# Protected Storage: versioned bucket with object lock (WORM).
# The real bucket name is "archive-<service code>": use full_name in S3 clients and other resources.
resource "gyro_storage_bucket" "archive" {
  service_id  = 789
  name        = "archive"
  object_lock = true
}
import os, uuid, requests

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

#GET/cloud/storage/{id}/keys

GET access-keys (GyroDepolama)Scope: services_readtyped_get_storage__id__keysOpenAPI for this operation

Typed shortcut of the generic bridge: tool access-keys. Body fields are the tool's own fields.

Parameters

FieldinTypeDescription
id requiredpathintegerService id

Responses

200Tool data / result — 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 'https://www.gyrohosting.com/api/v1/client/cloud/storage/12345/keys' \
  -H "Authorization: Bearer $GYRO_TOKEN"
gyro api request GET /cloud/storage/12345/keys
# resource gyro_storage_key: https://registry.terraform.io/providers/gyro-hosting/gyro/latest/docs/resources/storage_key
resource "gyro_storage_key" "ci" {
  service_id = 456
  label      = "ci-uploader"
}

output "s3_secret" {
  value     = gyro_storage_key.ci.secret_key
  sensitive = true
}
import os, uuid, requests

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

POST access-keys:create (GyroDepolama)Scope: services_writetyped_post_storage__id__keysOpenAPI for this operation

Typed shortcut of the generic bridge: tool access-keys, action create. Body fields are the tool's own fields.

Parameters

FieldinTypeDescription
id requiredpathintegerService id

Request body

FieldTypeDescription
confirmboolean

Responses

202Tool data / result — 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/storage/12345/keys' \
  -H "Authorization: Bearer $GYRO_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"confirm": true}'
gyro api request POST /cloud/storage/12345/keys --data '{"confirm": true}'
# resource gyro_storage_key: https://registry.terraform.io/providers/gyro-hosting/gyro/latest/docs/resources/storage_key
resource "gyro_storage_key" "ci" {
  service_id = 456
  label      = "ci-uploader"
}

output "s3_secret" {
  value     = gyro_storage_key.ci.secret_key
  sensitive = true
}
import os, uuid, requests

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

#POST/cloud/storage/{id}/keys/{key}/rotate

POST access-keys:rotate (GyroDepolama)Scope: services_writetyped_post_storage__id__keys__key__rotateOpenAPI for this operation

Typed shortcut of the generic bridge: tool access-keys, action rotate. Body fields are the tool's own fields. Needs "confirm": true.

Parameters

FieldinTypeDescription
id requiredpathintegerService id
key requiredpathstring

Request body

FieldTypeDescription
confirmboolean

Responses

202Tool data / result — 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/storage/12345/keys/1/rotate' \
  -H "Authorization: Bearer $GYRO_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"confirm": true}'
gyro storage key rotate 12345 --help    # all flags
# resource gyro_storage_key: https://registry.terraform.io/providers/gyro-hosting/gyro/latest/docs/resources/storage_key
resource "gyro_storage_key" "ci" {
  service_id = 456
  label      = "ci-uploader"
}

output "s3_secret" {
  value     = gyro_storage_key.ci.secret_key
  sensitive = true
}
import os, uuid, requests

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

DELETE access-keys:delete (GyroDepolama)Scope: services_writetyped_delete_storage__id__keys__keyOpenAPI for this operation

Typed shortcut of the generic bridge: tool access-keys, action delete. Body fields are the tool's own fields. Needs "confirm": true.

Parameters

FieldinTypeDescription
id requiredpathintegerService id
key requiredpathstring

Request body

FieldTypeDescription
confirmboolean

Responses

202Tool data / result — 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 DELETE 'https://www.gyrohosting.com/api/v1/client/cloud/storage/12345/keys/1' \
  -H "Authorization: Bearer $GYRO_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"confirm": true}'
gyro api request DELETE /cloud/storage/12345/keys/1 --data '{"confirm": true}'
# resource gyro_storage_key: https://registry.terraform.io/providers/gyro-hosting/gyro/latest/docs/resources/storage_key
resource "gyro_storage_key" "ci" {
  service_id = 456
  label      = "ci-uploader"
}

output "s3_secret" {
  value     = gyro_storage_key.ci.secret_key
  sensitive = true
}
import os, uuid, requests

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

#GET/cloud/storage/{id}/usage

GET usage (GyroDepolama)Scope: services_readtyped_get_storage__id__usageOpenAPI for this operation

Typed shortcut of the generic bridge: tool usage. Body fields are the tool's own fields.

Parameters

FieldinTypeDescription
id requiredpathintegerService id

Responses

200Tool data / result — 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 'https://www.gyrohosting.com/api/v1/client/cloud/storage/12345/usage' \
  -H "Authorization: Bearer $GYRO_TOKEN"
gyro storage usage get 12345
import os, uuid, requests

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

Rename a bucketScope: services_writetyped_post_storage__id__buckets__bucket__renameOpenAPI for this operation

Bucket names are private to the service (other customers may use the same name). Data is not moved. S3 access by the old name stops at once; the website moves to <new>-<service code>.web.gyro-s3.com and the old website address redirects (301) for 40 days; share links keep working. Max 5 renames per bucket per day; the old name cannot be reused inside the service for 40 days. Needs "confirm": true. Protected Storage (2.20.0): renaming is supported: the bucket's display name and website address (<new name>-<service code>.kweb.gyro-s3.com, old address 301 for 40 days) change; the S3 name stays the same (versions and locks are never moved), so S3 tools keep using it. The answer carries s3_name; GET /cloud/storage/{id}/buckets lists s3_name for every bucket.

Parameters

FieldinTypeDescription
id requiredpathintegerService id
bucket requiredpathstring

Request body

FieldTypeDescription
new_name requiredstring
confirmboolean

Responses

202Tool data / result — 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/storage/12345/buckets/1/rename' \
  -H "Authorization: Bearer $GYRO_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"new_name": "string", "confirm": true}'
gyro storage bucket rename 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/storage/12345/buckets/1/rename", headers=h, json={"new_name": "string", "confirm": True}, timeout=60)
r.raise_for_status()
print(r.json()["data"])
const res = await fetch("https://www.gyrohosting.com/api/v1/client/cloud/storage/12345/buckets/1/rename", {
  method: "POST",
  headers: {
    "Authorization": `Bearer ${process.env.GYRO_TOKEN}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({"new_name": "string", "confirm": true}),
});
const { data, error } = await res.json();
if (!res.ok) throw new Error(`${error.code}: ${error.message}`);

#GET/cloud/storage/{id}/buckets/{bucket}/objects

List objects in a bucket folderScope: services_readtyped_get_storage__id__buckets__bucket__objectsOpenAPI for this operation

One page (200) of a folder: folders (common prefixes) and files (key, size, modified). Pass next from the previous page to continue.

Parameters

FieldinTypeDescription
id requiredpathintegerService id
bucket requiredpathstring
prefixquerystringFolder, ends with / (empty = root)
searchquerystringName prefix inside the folder
nextquerystringContinuation token

Responses

200Tool data / result — 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 'https://www.gyrohosting.com/api/v1/client/cloud/storage/12345/buckets/1/objects' \
  -H "Authorization: Bearer $GYRO_TOKEN"
gyro storage object list 12345
import os, uuid, requests

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

Presigned upload URLsScope: services_writetyped_post_storage__id__buckets__bucket__objects_upload_urlOpenAPI for this operation

Up to 100 files per call, max 5 GiB each. PUT the file body to each url within 15 minutes; data never passes through the API. Larger files: any S3 client (multipart).

Parameters

FieldinTypeDescription
id requiredpathintegerService id
bucket requiredpathstring

Request body

FieldTypeDescription
prefixstringTarget folder (ends with /)
items requiredarray<object>
confirmboolean

Responses

202Tool data / result — 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/storage/12345/buckets/1/objects/upload-url' \
  -H "Authorization: Bearer $GYRO_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"prefix": "string", "items": [{"name": "string", "size": 1}], "confirm": true}'
gyro storage object upload-url 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/storage/12345/buckets/1/objects/upload-url", headers=h, json={"prefix": "string", "items": [{"name": "string", "size": 1}], "confirm": True}, timeout=60)
r.raise_for_status()
print(r.json()["data"])
const res = await fetch("https://www.gyrohosting.com/api/v1/client/cloud/storage/12345/buckets/1/objects/upload-url", {
  method: "POST",
  headers: {
    "Authorization": `Bearer ${process.env.GYRO_TOKEN}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({"prefix": "string", "items": [{"name": "string", "size": 1}], "confirm": true}),
});
const { data, error } = await res.json();
if (!res.ok) throw new Error(`${error.code}: ${error.message}`);

#POST/cloud/storage/{id}/buckets/{bucket}/objects/download-url

Presigned download URLScope: services_writetyped_post_storage__id__buckets__bucket__objects_download_urlOpenAPI for this operation

Returns a 15-minute GET URL (Content-Disposition: attachment). Downloads count toward the service's monthly traffic.

Parameters

FieldinTypeDescription
id requiredpathintegerService id
bucket requiredpathstring

Request body

FieldTypeDescription
key requiredstringObject key
confirmboolean

Responses

202Tool data / result — 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/storage/12345/buckets/1/objects/download-url' \
  -H "Authorization: Bearer $GYRO_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"key": "string", "confirm": true}'
gyro storage object download-url 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/storage/12345/buckets/1/objects/download-url", headers=h, json={"key": "string", "confirm": True}, timeout=60)
r.raise_for_status()
print(r.json()["data"])
const res = await fetch("https://www.gyrohosting.com/api/v1/client/cloud/storage/12345/buckets/1/objects/download-url", {
  method: "POST",
  headers: {
    "Authorization": `Bearer ${process.env.GYRO_TOKEN}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({"key": "string", "confirm": true}),
});
const { data, error } = await res.json();
if (!res.ok) throw new Error(`${error.code}: ${error.message}`);

#POST/cloud/storage/{id}/buckets/{bucket}/objects/delete

Delete objectsScope: services_writetyped_post_storage__id__buckets__bucket__objects_deleteOpenAPI for this operation

Deletes up to 1000 keys in one call. Needs "confirm": true.

Parameters

FieldinTypeDescription
id requiredpathintegerService id
bucket requiredpathstring

Request body

FieldTypeDescription
keys requiredarray<string>
confirmboolean

Responses

202Tool data / result — 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/storage/12345/buckets/1/objects/delete' \
  -H "Authorization: Bearer $GYRO_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"keys": ["string"], "confirm": true}'
gyro storage object delete 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/storage/12345/buckets/1/objects/delete", headers=h, json={"keys": ["string"], "confirm": True}, timeout=60)
r.raise_for_status()
print(r.json()["data"])
const res = await fetch("https://www.gyrohosting.com/api/v1/client/cloud/storage/12345/buckets/1/objects/delete", {
  method: "POST",
  headers: {
    "Authorization": `Bearer ${process.env.GYRO_TOKEN}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({"keys": ["string"], "confirm": true}),
});
const { data, error } = await res.json();
if (!res.ok) throw new Error(`${error.code}: ${error.message}`);

#POST/cloud/storage/{id}/buckets/{bucket}/folders

Create a folderScope: services_writetyped_post_storage__id__buckets__bucket__foldersOpenAPI for this operation

Creates an empty folder marker prefix + name + /.

Parameters

FieldinTypeDescription
id requiredpathintegerService id
bucket requiredpathstring

Request body

FieldTypeDescription
prefixstring
name requiredstring
confirmboolean

Responses

202Tool data / result — 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/storage/12345/buckets/1/folders' \
  -H "Authorization: Bearer $GYRO_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"prefix": "string", "name": "string", "confirm": true}'
gyro storage folder create 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/storage/12345/buckets/1/folders", headers=h, json={"prefix": "string", "name": "string", "confirm": True}, timeout=60)
r.raise_for_status()
print(r.json()["data"])
const res = await fetch("https://www.gyrohosting.com/api/v1/client/cloud/storage/12345/buckets/1/folders", {
  method: "POST",
  headers: {
    "Authorization": `Bearer ${process.env.GYRO_TOKEN}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({"prefix": "string", "name": "string", "confirm": true}),
});
const { data, error } = await res.json();
if (!res.ok) throw new Error(`${error.code}: ${error.message}`);

#DELETE/cloud/storage/{id}/buckets/{bucket}/folders

Delete a folder with its contentsScope: services_writetyped_delete_storage__id__buckets__bucket__foldersOpenAPI for this operation

Deletes every object under prefix (query). Large folders are deleted in batches: repeat while more is true. Needs "confirm": true.

Parameters

FieldinTypeDescription
id requiredpathintegerService id
bucket requiredpathstring
prefixquerystringFolder, ends with /

Request body

FieldTypeDescription
confirmboolean

Responses

202Tool data / result — 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 DELETE 'https://www.gyrohosting.com/api/v1/client/cloud/storage/12345/buckets/1/folders' \
  -H "Authorization: Bearer $GYRO_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"confirm": true}'
gyro storage folder delete 12345 --help    # all flags
import os, uuid, requests

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

#GET/cloud/storage/{id}/buckets/{bucket}/folders/count

Count objects in a folderScope: services_readtyped_get_storage__id__buckets__bucket__folders_countOpenAPI for this operation

Number of objects under prefix (more = over 100000 or time limit).

Parameters

FieldinTypeDescription
id requiredpathintegerService id
bucket requiredpathstring
prefixquerystringFolder, ends with /

Responses

200Tool data / result — 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 'https://www.gyrohosting.com/api/v1/client/cloud/storage/12345/buckets/1/folders/count' \
  -H "Authorization: Bearer $GYRO_TOKEN"
gyro storage folder count 12345
import os, uuid, requests

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

GET connect (GyroDepolama)Scope: services_readtyped_get_storage__id__connectOpenAPI for this operation

Typed shortcut of the generic bridge: tool connect. Body fields are the tool's own fields.

Parameters

FieldinTypeDescription
id requiredpathintegerService id

Responses

200Tool data / result — 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 'https://www.gyrohosting.com/api/v1/client/cloud/storage/12345/connect' \
  -H "Authorization: Bearer $GYRO_TOKEN"
gyro storage connect get 12345
import os, uuid, requests

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

Static website settings of a bucketScope: services_readtyped_get_storage__id__buckets__bucket__websiteOpenAPI for this operation

enabled, url, index_document (entry file, default index.html), error_document (404 page) and spa (single-page app fallback).

Parameters

FieldinTypeDescription
id requiredpathintegerService id
bucket requiredpathstring

Responses

200Tool data / result — 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 'https://www.gyrohosting.com/api/v1/client/cloud/storage/12345/buckets/1/website' \
  -H "Authorization: Bearer $GYRO_TOKEN"
gyro storage website get 12345
# resource gyro_storage_bucket_website: https://registry.terraform.io/providers/gyro-hosting/gyro/latest/docs/resources/storage_bucket_website
# Single-page app (React / Vue / Angular) published from a bucket
resource "gyro_storage_bucket_website" "app" {
  service_id     = 456 # object storage service
  bucket         = gyro_storage_bucket.assets.name
  index_document = "index.html" # entry file (default index.html)
  spa            = true         # missing paths (/dashboard/settings, reloads) return index.html with 200
}

# Classic static site with its own 404 page
resource "gyro_storage_bucket_website" "docs" {
  service_id     = 456
  bucket         = "docs"
  error_document = "404.html"
}

output "app_url" { value = gyro_storage_bucket_website.app.url }
import os, uuid, requests

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

Enable / update the static websiteScope: services_writetyped_put_storage__id__buckets__bucket__websiteOpenAPI for this operation

Full replace: omitted fields fall back to the defaults (index.html, no error page, SPA off). index_document is a file name (no /), served at the root and in every folder. spa: true answers every missing path with the entry file and status 200 (React/Vue/Angular routing, page reloads); real files are served as they are and the error page is not used while SPA is on. Enabling a disabled website needs accept: true (abuse rules: everything in the bucket becomes public). Address: https://<bucket>-<service code>.web.gyro-s3.com and connected custom domains.

Parameters

FieldinTypeDescription
id requiredpathintegerService id
bucket requiredpathstring

Request body

FieldTypeDescription
index_documentstringEntry file name, default index.html (e.g. app.html)
error_documentstringObject key of the 404 page (e.g. 404.html or errors/404.html), empty = none
spabooleanRoute missing sub-paths to the entry file with status 200
acceptbooleanAccept the abuse rules (needed when the website is off)
confirmboolean

Responses

202Tool data / result — 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 PUT 'https://www.gyrohosting.com/api/v1/client/cloud/storage/12345/buckets/1/website' \
  -H "Authorization: Bearer $GYRO_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"index_document": "string", "error_document": "string", "spa": true, "accept": true, "confirm": true}'
gyro storage website set 12345 --help    # all flags
# resource gyro_storage_bucket_website: https://registry.terraform.io/providers/gyro-hosting/gyro/latest/docs/resources/storage_bucket_website
# Single-page app (React / Vue / Angular) published from a bucket
resource "gyro_storage_bucket_website" "app" {
  service_id     = 456 # object storage service
  bucket         = gyro_storage_bucket.assets.name
  index_document = "index.html" # entry file (default index.html)
  spa            = true         # missing paths (/dashboard/settings, reloads) return index.html with 200
}

# Classic static site with its own 404 page
resource "gyro_storage_bucket_website" "docs" {
  service_id     = 456
  bucket         = "docs"
  error_document = "404.html"
}

output "app_url" { value = gyro_storage_bucket_website.app.url }
import os, uuid, requests

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

#DELETE/cloud/storage/{id}/buckets/{bucket}/website

Disable the static websiteScope: services_writetyped_delete_storage__id__buckets__bucket__websiteOpenAPI for this operation

The bucket stays; settings (entry file, error page, SPA) are kept for the next enable. Needs "confirm": true.

Parameters

FieldinTypeDescription
id requiredpathintegerService id
bucket requiredpathstring

Request body

FieldTypeDescription
confirmboolean

Responses

202Tool data / result — 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 DELETE 'https://www.gyrohosting.com/api/v1/client/cloud/storage/12345/buckets/1/website' \
  -H "Authorization: Bearer $GYRO_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"confirm": true}'
gyro storage website disable 12345 --help    # all flags
# resource gyro_storage_bucket_website: https://registry.terraform.io/providers/gyro-hosting/gyro/latest/docs/resources/storage_bucket_website
# Single-page app (React / Vue / Angular) published from a bucket
resource "gyro_storage_bucket_website" "app" {
  service_id     = 456 # object storage service
  bucket         = gyro_storage_bucket.assets.name
  index_document = "index.html" # entry file (default index.html)
  spa            = true         # missing paths (/dashboard/settings, reloads) return index.html with 200
}

# Classic static site with its own 404 page
resource "gyro_storage_bucket_website" "docs" {
  service_id     = 456
  bucket         = "docs"
  error_document = "404.html"
}

output "app_url" { value = gyro_storage_bucket_website.app.url }
import os, uuid, requests

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

#GET/cloud/storage/{id}/buckets/{bucket}/cors

CORS rules of a bucketScope: services_readtyped_get_storage__id__buckets__bucket__corsOpenAPI for this operation

rules (snake_case) and json (the same rules in AWS S3 format, pretty printed).

Parameters

FieldinTypeDescription
id requiredpathintegerService id
bucket requiredpathstring

Responses

200Tool data / result — 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 'https://www.gyrohosting.com/api/v1/client/cloud/storage/12345/buckets/1/cors' \
  -H "Authorization: Bearer $GYRO_TOKEN"
gyro storage cors get 12345
# resource gyro_storage_bucket_cors: https://registry.terraform.io/providers/gyro-hosting/gyro/latest/docs/resources/storage_bucket_cors
resource "gyro_storage_bucket_cors" "assets" {
  service_id = 456
  bucket     = gyro_storage_bucket.assets.name
  rules = [
    {
      id              = "browser-upload" # presigned PUT from your web app
      allowed_origins = ["https://www.example.com", "https://example.com"]
      allowed_methods = ["GET", "HEAD", "PUT", "POST"]
      allowed_headers = ["*"]
      expose_headers  = ["ETag"]
      max_age_seconds = 3600
    },
    {
      allowed_origins = ["*"] # public read for fonts / images
      allowed_methods = ["GET", "HEAD"]
    },
  ]
}
import os, uuid, requests

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

Replace the CORS rules of a bucketScope: services_writetyped_put_storage__id__buckets__bucket__corsOpenAPI for this operation

Replaces every rule. Send rules (array), CORSRules (an AWS put-bucket-cors file works as is: gyro storage cors set ID BUCKET --data @cors.json) or cors_json (the JSON as text). Field names may be AWS style (AllowedOrigins) or snake_case (allowed_origins). Limits: 100 rules, 50 origins/headers per rule, 16 KB, methods GET/PUT/POST/DELETE/HEAD, MaxAgeSeconds 0-86400, at most one * per origin. An empty list removes the rules. Rules apply to the S3 endpoint and to the static website (and custom domains).

Parameters

FieldinTypeDescription
id requiredpathintegerService id
bucket requiredpathstring

Request body

FieldTypeDescription
rulesobjectCORS rules as a JSON array
cors_jsonstringAlternative: the rules as JSON text ({"CORSRules":[...]} or [...])
confirmboolean

Responses

202Tool data / result — 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 PUT 'https://www.gyrohosting.com/api/v1/client/cloud/storage/12345/buckets/1/cors' \
  -H "Authorization: Bearer $GYRO_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"rules": {}, "cors_json": "string", "confirm": true}'
gyro storage cors set 12345 --help    # all flags
# resource gyro_storage_bucket_cors: https://registry.terraform.io/providers/gyro-hosting/gyro/latest/docs/resources/storage_bucket_cors
resource "gyro_storage_bucket_cors" "assets" {
  service_id = 456
  bucket     = gyro_storage_bucket.assets.name
  rules = [
    {
      id              = "browser-upload" # presigned PUT from your web app
      allowed_origins = ["https://www.example.com", "https://example.com"]
      allowed_methods = ["GET", "HEAD", "PUT", "POST"]
      allowed_headers = ["*"]
      expose_headers  = ["ETag"]
      max_age_seconds = 3600
    },
    {
      allowed_origins = ["*"] # public read for fonts / images
      allowed_methods = ["GET", "HEAD"]
    },
  ]
}
import os, uuid, requests

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

#DELETE/cloud/storage/{id}/buckets/{bucket}/cors

Remove every CORS rule of a bucketScope: services_writetyped_delete_storage__id__buckets__bucket__corsOpenAPI for this operation

Browsers can no longer read the bucket cross-origin. Needs "confirm": true.

Parameters

FieldinTypeDescription
id requiredpathintegerService id
bucket requiredpathstring

Request body

FieldTypeDescription
confirmboolean

Responses

202Tool data / result — 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 DELETE 'https://www.gyrohosting.com/api/v1/client/cloud/storage/12345/buckets/1/cors' \
  -H "Authorization: Bearer $GYRO_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"confirm": true}'
gyro storage cors delete 12345 --help    # all flags
# resource gyro_storage_bucket_cors: https://registry.terraform.io/providers/gyro-hosting/gyro/latest/docs/resources/storage_bucket_cors
resource "gyro_storage_bucket_cors" "assets" {
  service_id = 456
  bucket     = gyro_storage_bucket.assets.name
  rules = [
    {
      id              = "browser-upload" # presigned PUT from your web app
      allowed_origins = ["https://www.example.com", "https://example.com"]
      allowed_methods = ["GET", "HEAD", "PUT", "POST"]
      allowed_headers = ["*"]
      expose_headers  = ["ETag"]
      max_age_seconds = 3600
    },
    {
      allowed_origins = ["*"] # public read for fonts / images
      allowed_methods = ["GET", "HEAD"]
    },
  ]
}
import os, uuid, requests

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

#GET/cloud/storage/{id}/object-lock

Protected Storage: object lock summaryScope: services_readgetStorageObjectLockOpenAPI for this operation

Locked-bucket rights (Object Lock add-on) and use, the default retention of every bucket, and the last lock scan (number of COMPLIANCE / GOVERNANCE / legal hold versions and the latest end date). Protected Storage only: a standard Object Storage service answers 409 feature_not_available.

Parameters

FieldinTypeDescription
id requiredpathintegerService id (Protected Storage)

Responses

200OK — data: StorageObjectLockSummary
404Not found — also returned for objects owned by someone else
409feature_not_available (standard Object Storage service) or not_actionable
422Validation or business rule failure (confirm_required, invalid_image, tool_action_failed ...)

Examples

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

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

Scan locked versions nowScope: services_writescanStorageObjectLockOpenAPI for this operation

Counts locked versions in every locked bucket (up to 25 s / 5000 versions; complete: false when cut short).

Parameters

FieldinTypeDescription
id requiredpathintegerService id (Protected Storage)

Responses

202OK — data: object
404Not found — also returned for objects owned by someone else
409feature_not_available (standard Object Storage service) or not_actionable
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/storage/12345/object-lock/scan' \
  -H "Authorization: Bearer $GYRO_TOKEN"
gyro storage object-lock scan 12345
import os, uuid, requests

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

#GET/cloud/storage/{id}/buckets/{bucket}/versions

List object versionsScope: services_readlistStorageVersionsOpenAPI for this operation

Versions and delete markers of one folder (50 per page, / delimiter; sub-folders in folders). Continue with key_marker + version_id_marker from the previous page while truncated is true. In locked buckets each version carries lock_mode, retain_until and legal_hold.

Parameters

FieldinTypeDescription
id requiredpathintegerService id (Protected Storage)
bucket requiredpathstringBucket name (full name, with the -code suffix)
prefixquerystringFolder or key prefix (empty = root)
key_markerquerystringContinuation: next_key_marker of the previous page
version_id_markerquerystringContinuation: next_version_id_marker of the previous page

Responses

200OK — data: StorageVersionList
404Not found — also returned for objects owned by someone else
409feature_not_available (standard Object Storage service) or not_actionable
422Validation or business rule failure (confirm_required, invalid_image, tool_action_failed ...)

Examples

curl -s 'https://www.gyrohosting.com/api/v1/client/cloud/storage/12345/buckets/1/versions' \
  -H "Authorization: Bearer $GYRO_TOKEN"
gyro storage versions list 12345
import os, uuid, requests

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

Permanently delete a versionScope: services_writedeleteStorageVersionOpenAPI for this operation

Permanently deletes one version or delete marker (cannot be undone). Versions under GOVERNANCE / COMPLIANCE retention or legal hold are refused with the end date. Needs confirm=true.

Parameters

FieldinTypeDescription
id requiredpathintegerService id (Protected Storage)
bucket requiredpathstringBucket name (full name, with the -code suffix)
key requiredquerystringObject key
version_id requiredquerystringVersion id
confirm requiredqueryboolean

Responses

202OK — data: object
404Not found — also returned for objects owned by someone else
409feature_not_available (standard Object Storage service) or not_actionable
422Validation or business rule failure (confirm_required, invalid_image, tool_action_failed ...)

Examples

curl -s -X DELETE 'https://www.gyrohosting.com/api/v1/client/cloud/storage/12345/buckets/1/versions' \
  -H "Authorization: Bearer $GYRO_TOKEN"
gyro storage versions delete 12345
import os, uuid, requests

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

Restore an older versionScope: services_writerestoreStorageVersionOpenAPI for this operation

Copies the version as the new current version (the old one stays). Max 5 GB; delete markers cannot be restored (use undelete).

Parameters

FieldinTypeDescription
id requiredpathintegerService id (Protected Storage)
bucket requiredpathstringBucket name (full name, with the -code suffix)

Request body

FieldTypeDescription
key requiredstringObject key
version_id requiredstringVersion id (from versions list)

Responses

202OK — data: object
404Not found — also returned for objects owned by someone else
409feature_not_available (standard Object Storage service) or not_actionable
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/storage/12345/buckets/1/versions/restore' \
  -H "Authorization: Bearer $GYRO_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"key": "string", "version_id": "string"}'
gyro storage versions restore 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/storage/12345/buckets/1/versions/restore", headers=h, json={"key": "string", "version_id": "string"}, timeout=60)
r.raise_for_status()
print(r.json()["data"])
const res = await fetch("https://www.gyrohosting.com/api/v1/client/cloud/storage/12345/buckets/1/versions/restore", {
  method: "POST",
  headers: {
    "Authorization": `Bearer ${process.env.GYRO_TOKEN}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({"key": "string", "version_id": "string"}),
});
const { data, error } = await res.json();
if (!res.ok) throw new Error(`${error.code}: ${error.message}`);

#POST/cloud/storage/{id}/buckets/{bucket}/versions/undelete

Remove a delete markerScope: services_writeundeleteStorageObjectOpenAPI for this operation

Removes the latest delete marker of the key, so the previous version becomes current again. version_id must be that delete marker.

Parameters

FieldinTypeDescription
id requiredpathintegerService id (Protected Storage)
bucket requiredpathstringBucket name (full name, with the -code suffix)

Request body

FieldTypeDescription
key requiredstringObject key
version_id requiredstringVersion id (from versions list)

Responses

202OK — data: object
404Not found — also returned for objects owned by someone else
409feature_not_available (standard Object Storage service) or not_actionable
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/storage/12345/buckets/1/versions/undelete' \
  -H "Authorization: Bearer $GYRO_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"key": "string", "version_id": "string"}'
gyro storage versions undelete 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/storage/12345/buckets/1/versions/undelete", headers=h, json={"key": "string", "version_id": "string"}, timeout=60)
r.raise_for_status()
print(r.json()["data"])
const res = await fetch("https://www.gyrohosting.com/api/v1/client/cloud/storage/12345/buckets/1/versions/undelete", {
  method: "POST",
  headers: {
    "Authorization": `Bearer ${process.env.GYRO_TOKEN}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({"key": "string", "version_id": "string"}),
});
const { data, error } = await res.json();
if (!res.ok) throw new Error(`${error.code}: ${error.message}`);

#GET/cloud/storage/{id}/buckets/{bucket}/object-lock

Default retention of a bucketScope: services_readgetStorageBucketObjectLockOpenAPI for this operation

object_lock (set at creation, cannot change) and default_retention (null = none): new objects get this retention automatically.

Parameters

FieldinTypeDescription
id requiredpathintegerService id (Protected Storage)
bucket requiredpathstringBucket name (full name, with the -code suffix)

Responses

200OK — data: StorageBucketObjectLock
404Not found — also returned for objects owned by someone else
409feature_not_available (standard Object Storage service) or not_actionable
422Validation or business rule failure (confirm_required, invalid_image, tool_action_failed ...)

Examples

curl -s 'https://www.gyrohosting.com/api/v1/client/cloud/storage/12345/buckets/1/object-lock' \
  -H "Authorization: Bearer $GYRO_TOKEN"
gyro storage object-lock get 12345
# resource gyro_storage_bucket_object_lock: https://registry.terraform.io/providers/gyro-hosting/gyro/latest/docs/resources/storage_bucket_object_lock
# Lock every new object version for 30 days (GOVERNANCE: Gyro staff can bypass it on request).
resource "gyro_storage_bucket_object_lock" "archive" {
  service_id = gyro_storage_bucket.archive.service_id
  bucket     = gyro_storage_bucket.archive.full_name
  mode       = "GOVERNANCE"
  days       = 30
}

# COMPLIANCE: nobody (Gyro included) can delete or shorten the lock until it expires.
# resource "gyro_storage_bucket_object_lock" "audit" {
#   service_id             = 789
#   bucket                 = gyro_storage_bucket.audit.full_name
#   mode                   = "COMPLIANCE"
#   days                   = 365
#   acknowledge_compliance = true
# }
import os, uuid, requests

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

Set the default retention of a bucketScope: services_writesetStorageBucketObjectLockOpenAPI for this operation

Locked buckets only. mode GOVERNANCE or COMPLIANCE with days 1-3650, or OFF (new objects get no automatic retention; existing locks stay). GOVERNANCE: only Gyro staff can bypass it on request. COMPLIANCE cannot be shortened, switched to GOVERNANCE or removed by anyone (Gyro included) until it expires; the data is kept and the service keeps being billed until then, even after cancellation. Send "confirm": true and "acknowledge": "COMPLIANCE".

Parameters

FieldinTypeDescription
id requiredpathintegerService id (Protected Storage)
bucket requiredpathstringBucket name (full name, with the -code suffix)

Request body

FieldTypeDescription
mode requiredstring (GOVERNANCE, COMPLIANCE, OFF)
daysintegerRetention days (not with OFF)
acknowledgestring (COMPLIANCE)COMPLIANCE only: type COMPLIANCE to accept that it cannot be removed
confirmboolean

Responses

202OK — data: StorageBucketObjectLock
404Not found — also returned for objects owned by someone else
409feature_not_available (standard Object Storage service) or not_actionable
422Validation or business rule failure (confirm_required, invalid_image, tool_action_failed ...)

Examples

curl -s -X PUT 'https://www.gyrohosting.com/api/v1/client/cloud/storage/12345/buckets/1/object-lock' \
  -H "Authorization: Bearer $GYRO_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"mode": "GOVERNANCE", "days": 1, "acknowledge": "COMPLIANCE", "confirm": true}'
gyro storage object-lock set 12345 --help    # all flags
# resource gyro_storage_bucket_object_lock: https://registry.terraform.io/providers/gyro-hosting/gyro/latest/docs/resources/storage_bucket_object_lock
# Lock every new object version for 30 days (GOVERNANCE: Gyro staff can bypass it on request).
resource "gyro_storage_bucket_object_lock" "archive" {
  service_id = gyro_storage_bucket.archive.service_id
  bucket     = gyro_storage_bucket.archive.full_name
  mode       = "GOVERNANCE"
  days       = 30
}

# COMPLIANCE: nobody (Gyro included) can delete or shorten the lock until it expires.
# resource "gyro_storage_bucket_object_lock" "audit" {
#   service_id             = 789
#   bucket                 = gyro_storage_bucket.audit.full_name
#   mode                   = "COMPLIANCE"
#   days                   = 365
#   acknowledge_compliance = true
# }
import os, uuid, requests

h = {"Authorization": "Bearer " + os.environ["GYRO_TOKEN"]}
r = requests.put("https://www.gyrohosting.com/api/v1/client/cloud/storage/12345/buckets/1/object-lock", headers=h, json={"mode": "GOVERNANCE", "days": 1, "acknowledge": "COMPLIANCE", "confirm": True}, timeout=60)
r.raise_for_status()
print(r.json()["data"])
const res = await fetch("https://www.gyrohosting.com/api/v1/client/cloud/storage/12345/buckets/1/object-lock", {
  method: "PUT",
  headers: {
    "Authorization": `Bearer ${process.env.GYRO_TOKEN}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({"mode": "GOVERNANCE", "days": 1, "acknowledge": "COMPLIANCE", "confirm": true}),
});
const { data, error } = await res.json();
if (!res.ok) throw new Error(`${error.code}: ${error.message}`);

#GET/cloud/storage/{id}/buckets/{bucket}/objects/retention

Retention of an object versionScope: services_readgetStorageObjectRetentionOpenAPI for this operation

Lock mode, end date and legal hold of one version (version_id empty = current version).

Parameters

FieldinTypeDescription
id requiredpathintegerService id (Protected Storage)
bucket requiredpathstringBucket name (full name, with the -code suffix)
key requiredquerystringObject key
version_idquerystringVersion id (empty = current)

Responses

200OK — data: StorageObjectRetention
404Not found — also returned for objects owned by someone else
409feature_not_available (standard Object Storage service) or not_actionable
422Validation or business rule failure (confirm_required, invalid_image, tool_action_failed ...)

Examples

curl -s 'https://www.gyrohosting.com/api/v1/client/cloud/storage/12345/buckets/1/objects/retention' \
  -H "Authorization: Bearer $GYRO_TOKEN"
gyro storage object retention get 12345
import os, uuid, requests

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

Lock an object versionScope: services_writesetStorageObjectRetentionOpenAPI for this operation

Sets or extends the retention of one version (version_id empty = current) for days 1-3650 from now. Retention can only be extended; COMPLIANCE cannot be switched to GOVERNANCE. COMPLIANCE cannot be shortened, switched to GOVERNANCE or removed by anyone (Gyro included) until it expires; the data is kept and the service keeps being billed until then, even after cancellation. Send "confirm": true and "acknowledge": "COMPLIANCE".

Parameters

FieldinTypeDescription
id requiredpathintegerService id (Protected Storage)
bucket requiredpathstringBucket name (full name, with the -code suffix)

Request body

FieldTypeDescription
key requiredstring
version_idstringEmpty = current version
mode requiredstring (GOVERNANCE, COMPLIANCE)
days requiredinteger
acknowledgestring (COMPLIANCE)COMPLIANCE only: type COMPLIANCE
confirmboolean

Responses

202OK — data: StorageObjectRetention
404Not found — also returned for objects owned by someone else
409feature_not_available (standard Object Storage service) or not_actionable
422Validation or business rule failure (confirm_required, invalid_image, tool_action_failed ...)

Examples

curl -s -X PUT 'https://www.gyrohosting.com/api/v1/client/cloud/storage/12345/buckets/1/objects/retention' \
  -H "Authorization: Bearer $GYRO_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"key": "string", "version_id": "string", "mode": "GOVERNANCE", "days": 1, "acknowledge": "COMPLIANCE", "confirm": true}'
gyro storage object retention set 12345 --help    # all flags
import os, uuid, requests

h = {"Authorization": "Bearer " + os.environ["GYRO_TOKEN"]}
r = requests.put("https://www.gyrohosting.com/api/v1/client/cloud/storage/12345/buckets/1/objects/retention", headers=h, json={"key": "string", "version_id": "string", "mode": "GOVERNANCE", "days": 1, "acknowledge": "COMPLIANCE", "confirm": True}, timeout=60)
r.raise_for_status()
print(r.json()["data"])
const res = await fetch("https://www.gyrohosting.com/api/v1/client/cloud/storage/12345/buckets/1/objects/retention", {
  method: "PUT",
  headers: {
    "Authorization": `Bearer ${process.env.GYRO_TOKEN}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({"key": "string", "version_id": "string", "mode": "GOVERNANCE", "days": 1, "acknowledge": "COMPLIANCE", "confirm": true}),
});
const { data, error } = await res.json();
if (!res.ok) throw new Error(`${error.code}: ${error.message}`);

#GET/cloud/storage/{id}/buckets/{bucket}/objects/legal-hold

Legal hold of an object versionScope: services_readgetStorageObjectLegalHoldOpenAPI for this operation

legal_hold true = the version cannot be deleted until the hold is removed (no end date).

Parameters

FieldinTypeDescription
id requiredpathintegerService id (Protected Storage)
bucket requiredpathstringBucket name (full name, with the -code suffix)
key requiredquerystringObject key
version_idquerystringVersion id (empty = current)

Responses

200OK — data: object
404Not found — also returned for objects owned by someone else
409feature_not_available (standard Object Storage service) or not_actionable
422Validation or business rule failure (confirm_required, invalid_image, tool_action_failed ...)

Examples

curl -s 'https://www.gyrohosting.com/api/v1/client/cloud/storage/12345/buckets/1/objects/legal-hold' \
  -H "Authorization: Bearer $GYRO_TOKEN"
gyro storage object legal-hold get 12345
import os, uuid, requests

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

Place or remove a legal holdScope: services_writesetStorageObjectLegalHoldOpenAPI for this operation

status on / off (locked buckets only). A legal hold blocks deletion with no end date, independent of retention; you can remove it yourself.

Parameters

FieldinTypeDescription
id requiredpathintegerService id (Protected Storage)
bucket requiredpathstringBucket name (full name, with the -code suffix)

Request body

FieldTypeDescription
key requiredstring
version_idstringEmpty = current version
status requiredstring (on, off)

Responses

202OK — data: object
404Not found — also returned for objects owned by someone else
409feature_not_available (standard Object Storage service) or not_actionable
422Validation or business rule failure (confirm_required, invalid_image, tool_action_failed ...)

Examples

curl -s -X PUT 'https://www.gyrohosting.com/api/v1/client/cloud/storage/12345/buckets/1/objects/legal-hold' \
  -H "Authorization: Bearer $GYRO_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"key": "string", "version_id": "string", "status": "on"}'
gyro storage object legal-hold set 12345 --help    # all flags
import os, uuid, requests

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

#GET/cloud/storage/{id}/buckets/{bucket}/lifecycle/noncurrent

Old version expiry of a bucketScope: services_readgetStorageNoncurrentExpirationOpenAPI for this operation

Days after which non-current versions are deleted (new buckets: 30). 0 / null = kept until you delete them (they count toward the quota).

Parameters

FieldinTypeDescription
id requiredpathintegerService id (Protected Storage)
bucket requiredpathstringBucket name (full name, with the -code suffix)

Responses

200OK — data: StorageNoncurrentExpiration
404Not found — also returned for objects owned by someone else
409feature_not_available (standard Object Storage service) or not_actionable
422Validation or business rule failure (confirm_required, invalid_image, tool_action_failed ...)

Examples

curl -s 'https://www.gyrohosting.com/api/v1/client/cloud/storage/12345/buckets/1/lifecycle/noncurrent' \
  -H "Authorization: Bearer $GYRO_TOKEN"
gyro storage lifecycle noncurrent get 12345
# resource gyro_storage_bucket_noncurrent_expiration: https://registry.terraform.io/providers/gyro-hosting/gyro/latest/docs/resources/storage_bucket_noncurrent_expiration
# Delete old (non-current) versions 7 days after they are replaced or deleted.
resource "gyro_storage_bucket_noncurrent_expiration" "archive" {
  service_id = gyro_storage_bucket.archive.service_id
  bucket     = gyro_storage_bucket.archive.full_name
  days       = 7
}
import os, uuid, requests

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

Set old version expiryScope: services_writesetStorageNoncurrentExpirationOpenAPI for this operation

days 1-3650, or 0 to keep old versions. Locked versions are deleted only after their retention ends. Other lifecycle rules of the bucket are kept.

Parameters

FieldinTypeDescription
id requiredpathintegerService id (Protected Storage)
bucket requiredpathstringBucket name (full name, with the -code suffix)

Request body

FieldTypeDescription
days requiredinteger

Responses

202OK — data: StorageNoncurrentExpiration
404Not found — also returned for objects owned by someone else
409feature_not_available (standard Object Storage service) or not_actionable
422Validation or business rule failure (confirm_required, invalid_image, tool_action_failed ...)

Examples

curl -s -X PUT 'https://www.gyrohosting.com/api/v1/client/cloud/storage/12345/buckets/1/lifecycle/noncurrent' \
  -H "Authorization: Bearer $GYRO_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"days": 1}'
gyro storage lifecycle noncurrent set 12345 --help    # all flags
# resource gyro_storage_bucket_noncurrent_expiration: https://registry.terraform.io/providers/gyro-hosting/gyro/latest/docs/resources/storage_bucket_noncurrent_expiration
# Delete old (non-current) versions 7 days after they are replaced or deleted.
resource "gyro_storage_bucket_noncurrent_expiration" "archive" {
  service_id = gyro_storage_bucket.archive.service_id
  bucket     = gyro_storage_bucket.archive.full_name
  days       = 7
}
import os, uuid, requests

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

#GET/cloud/servers/{id}/storage-mounts

List object storage mounts of a serverScope: cloud_readlistStorageMountsOpenAPI for this operation

Mount a bucket of your Gyro Object Storage service on a Linux server (systemd) as a folder (rclone FUSE mount with a local write cache, starts on boot, reconnects). Each mount gets its own access key limited to that one bucket (read-only or read/write); it does not use your key limit and is deleted with the mount. Gyro Cloud Istanbul (tr-ist-1) servers apply it automatically (automatic: true); other servers run install_command once. Free; S3 traffic counts towards the storage service. Protected Storage buckets: read-only by default (2.20.0). Supported servers: Gyro Cloud (Istanbul and EU), Turkey VDS, dedicated servers.

Parameters

FieldinTypeDescription
id requiredpathintegerServer service id

Responses

200OK — data: object
404Not found — also returned for objects owned by someone else
409server_not_active | storage_not_active | limit | mount_point_in_use | mount_point_nested | not_live
422Validation or business rule failure (confirm_required, invalid_image, tool_action_failed ...)
429rate_limited
503storage_mount_unavailable

Examples

curl -s 'https://www.gyrohosting.com/api/v1/client/cloud/servers/12345/storage-mounts' \
  -H "Authorization: Bearer $GYRO_TOKEN"
gyro server storage-mount list 12345
# resource gyro_server_storage_mount: https://registry.terraform.io/providers/gyro-hosting/gyro/latest/docs/resources/server_storage_mount
resource "gyro_server_storage_mount" "backups" {
  server_id          = gyro_server.web.id
  storage_service_id = 17546
  bucket             = "backups"
  mount_point        = "/mnt/backups"
}

# On servers outside tr-ist-1 run the one-time command on the server (sensitive, valid 60 minutes):
output "mount_command" {
  value     = gyro_server_storage_mount.backups.automatic ? "" : gyro_server_storage_mount.backups.install_command
  sensitive = true
}
import os, uuid, requests

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

Mount a bucket on the serverScope: cloud_writecreateStorageMountOpenAPI for this operation

Mount a bucket of your Gyro Object Storage service on a Linux server (systemd) as a folder (rclone FUSE mount with a local write cache, starts on boot, reconnects). Each mount gets its own access key limited to that one bucket (read-only or read/write); it does not use your key limit and is deleted with the mount. Gyro Cloud Istanbul (tr-ist-1) servers apply it automatically (automatic: true); other servers run install_command once. Free; S3 traffic counts towards the storage service. Supported servers: Gyro Cloud (Istanbul and EU), Turkey VDS, dedicated servers. The answer carries install_command (single use, 60 minutes). Protected Storage (2.20.0): supported; read-only unless read_only: false together with accept_versioning: true.

Parameters

FieldinTypeDescription
id requiredpathintegerServer service id

Request body

FieldTypeDescription
storage_service_id requiredintegeryour active Object Storage service
bucket requiredstringbucket name in that service
mount_pointstringabsolute path under /mnt, /srv, /data, /media, /opt, /home or /var/www; default /mnt/<bucket>. Must be empty or missing on the server.
read_onlybooleanDefault: false on Object Storage, true on Protected Storage.
accept_versioningbooleanProtected Storage read/write only: confirms that every write/overwrite creates a new version, deletes only add a delete marker, locked files cannot be deleted and used space/cost grow. Without it: 422 versioning_ack_required.

Responses

202OK — data: object
404Not found — also returned for objects owned by someone else
409server_not_active | storage_not_active | limit | mount_point_in_use | mount_point_nested | not_live
422invalid_bucket | invalid_mount_point | versioning_ack_required (Protected Storage read/write without accept_versioning) | storage_error
429rate_limited
503storage_mount_unavailable

Examples

curl -s -X POST 'https://www.gyrohosting.com/api/v1/client/cloud/servers/12345/storage-mounts' \
  -H "Authorization: Bearer $GYRO_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"storage_service_id": 1, "bucket": "backups", "mount_point": "/mnt/backups", "read_only": true, "accept_versioning": true}'
gyro server storage-mount create 12345 --help    # all flags
# resource gyro_server_storage_mount: https://registry.terraform.io/providers/gyro-hosting/gyro/latest/docs/resources/server_storage_mount
resource "gyro_server_storage_mount" "backups" {
  server_id          = gyro_server.web.id
  storage_service_id = 17546
  bucket             = "backups"
  mount_point        = "/mnt/backups"
}

# On servers outside tr-ist-1 run the one-time command on the server (sensitive, valid 60 minutes):
output "mount_command" {
  value     = gyro_server_storage_mount.backups.automatic ? "" : gyro_server_storage_mount.backups.install_command
  sensitive = true
}
import os, uuid, requests

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

#GET/cloud/servers/{id}/storage-mounts/{mid}

Get one storage mountScope: cloud_readgetStorageMountOpenAPI for this operation

Parameters

FieldinTypeDescription
id requiredpathintegerServer service id
mid requiredpathintegerStorage mount id

Responses

200OK — data: object
404Not found — also returned for objects owned by someone else
409server_not_active | storage_not_active | limit | mount_point_in_use | mount_point_nested | not_live
422Validation or business rule failure (confirm_required, invalid_image, tool_action_failed ...)
429rate_limited
503storage_mount_unavailable

Examples

curl -s 'https://www.gyrohosting.com/api/v1/client/cloud/servers/12345/storage-mounts/1' \
  -H "Authorization: Bearer $GYRO_TOKEN"
gyro server storage-mount get 12345
# resource gyro_server_storage_mount: https://registry.terraform.io/providers/gyro-hosting/gyro/latest/docs/resources/server_storage_mount
resource "gyro_server_storage_mount" "backups" {
  server_id          = gyro_server.web.id
  storage_service_id = 17546
  bucket             = "backups"
  mount_point        = "/mnt/backups"
}

# On servers outside tr-ist-1 run the one-time command on the server (sensitive, valid 60 minutes):
output "mount_command" {
  value     = gyro_server_storage_mount.backups.automatic ? "" : gyro_server_storage_mount.backups.install_command
  sensitive = true
}
import os, uuid, requests

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

#DELETE/cloud/servers/{id}/storage-mounts/{mid}

Remove a storage mountScope: cloud_writedeleteStorageMountOpenAPI for this operation

The mount key is deleted at once (the server can no longer reach the bucket; files in the bucket are kept). tr-ist-1 servers remove the unit automatically; on others run remove_command.

Parameters

FieldinTypeDescription
id requiredpathintegerServer service id
mid requiredpathintegerStorage mount id

Responses

202OK — data: object
404Not found — also returned for objects owned by someone else
409server_not_active | storage_not_active | limit | mount_point_in_use | mount_point_nested | not_live
422Validation or business rule failure (confirm_required, invalid_image, tool_action_failed ...)
429rate_limited
503storage_mount_unavailable

Examples

curl -s -X DELETE 'https://www.gyrohosting.com/api/v1/client/cloud/servers/12345/storage-mounts/1' \
  -H "Authorization: Bearer $GYRO_TOKEN"
gyro server storage-mount remove 12345
# resource gyro_server_storage_mount: https://registry.terraform.io/providers/gyro-hosting/gyro/latest/docs/resources/server_storage_mount
resource "gyro_server_storage_mount" "backups" {
  server_id          = gyro_server.web.id
  storage_service_id = 17546
  bucket             = "backups"
  mount_point        = "/mnt/backups"
}

# On servers outside tr-ist-1 run the one-time command on the server (sensitive, valid 60 minutes):
output "mount_command" {
  value     = gyro_server_storage_mount.backups.automatic ? "" : gyro_server_storage_mount.backups.install_command
  sensitive = true
}
import os, uuid, requests

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

New install command (rotates the mount key)Scope: cloud_writerenewStorageMountCommandOpenAPI for this operation

Creates a new access key for the mount and a new single-use install command (the old key stops at once). Use after reinstalling the server or when the command expired.

Parameters

FieldinTypeDescription
id requiredpathintegerServer service id
mid requiredpathintegerStorage mount id

Responses

202OK — data: object
404Not found — also returned for objects owned by someone else
409server_not_active | storage_not_active | limit | mount_point_in_use | mount_point_nested | not_live
422Validation or business rule failure (confirm_required, invalid_image, tool_action_failed ...)
429rate_limited
503storage_mount_unavailable

Examples

curl -s -X POST 'https://www.gyrohosting.com/api/v1/client/cloud/servers/12345/storage-mounts/1/command' \
  -H "Authorization: Bearer $GYRO_TOKEN"
gyro server storage-mount command 12345
# resource gyro_server_storage_mount: https://registry.terraform.io/providers/gyro-hosting/gyro/latest/docs/resources/server_storage_mount
resource "gyro_server_storage_mount" "backups" {
  server_id          = gyro_server.web.id
  storage_service_id = 17546
  bucket             = "backups"
  mount_point        = "/mnt/backups"
}

# On servers outside tr-ist-1 run the one-time command on the server (sensitive, valid 60 minutes):
output "mount_command" {
  value     = gyro_server_storage_mount.backups.automatic ? "" : gyro_server_storage_mount.backups.install_command
  sensitive = true
}
import os, uuid, requests

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

#GET/cloud/storage/plans

List Object Storage plansScope: cloud_readlistStoragePlansOpenAPI for this operation

Orderable Object Storage (standard-) and Protected Storage (protected-) plans with limits, prices per billing cycle (fixed EUR, VAT excluded) and add-ons: extra traffic packs (1tb, 5tb, one-time, this calendar month) and object lock buckets (protected plans). available: false = no capacity right now.

Responses

200OK — data: array<StoragePlan>

Examples

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

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

List storage servicesScope: services_readlistStorageServicesOpenAPI for this operation

Object Storage and Protected Storage services of the account (same filters and paging as GET /cloud/services).

Responses

200OK

Examples

curl -s 'https://www.gyrohosting.com/api/v1/client/cloud/storage' \
  -H "Authorization: Bearer $GYRO_TOKEN"
gyro api request GET /cloud/storage
# resource gyro_storage: https://registry.terraform.io/providers/gyro-hosting/gyro/latest/docs/resources/storage
# Object Storage (S3) 1 TB, billed monthly from the account balance
resource "gyro_storage" "yedek" {
  plan  = "standard-1tb"
  cycle = "monthly"
  name  = "gyro-proje-yedek"

  # destroy deletes every bucket and object of the service
  lifecycle {
    prevent_destroy = true
  }
}

# Protected Storage with 2 object lock (WORM) buckets
resource "gyro_storage" "worm" {
  plan                = "protected-250gb"
  cycle               = "annually"
  object_lock_buckets = 2
}

resource "gyro_storage_bucket" "dosyalar" {
  service_id = gyro_storage.yedek.service_id
  name       = "gyro-proje-dosyalar"
}
import os, uuid, requests

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

Order Object Storage (S3)Scope: cloud_ordercreateStorageServicesOpenAPI for this operation

Orders 1..N storage services of a plan in ONE order (quantity, default 1, max 25) and pays from the account balance (never a stored card). Billed per cycle (monthly | quarterly | semiannually | annually; fixed EUR prices charged in the account currency) and renewed from the balance like other services. extra_traffic (1tb | 5tb) adds a one-time traffic pack for this month; object_lock_buckets (protected plans, 1-50) buys object lock rights (billed every cycle). name (with {n}), tags and project_id label the services. Send "dry_run": true for a quote; a real order needs "confirm": true and an Idempotency-Key header. The first bucket and the first access key are created automatically within about a minute (status inprocess -> active); then use /cloud/storage/{id}/buckets, /cloud/storage/{id}/keys and /cloud/storage/{id}/connect. Errors: 402 insufficient_balance, 409 capacity_unavailable, 422 confirm_required (with quote), product_not_orderable, cycle_invalid, invalid_extra_traffic, invalid_object_lock, invalid_quantity; 429 daily_limit.

Parameters

FieldinTypeDescription
Idempotency-Key requiredheaderstringUnique per logical request (e.g. a UUID). Replays within 24 hours return the stored answer.

Request body

FieldTypeDescription
planstringplan from GET /cloud/storage/plans
product_idintegerproduct id instead of plan
cyclestring (monthly, quarterly, semiannually, annually)billing cycle
quantityintegerservices to create in one order (--count), max 25
extra_trafficstring (1tb, 5tb)one-time traffic pack for this calendar month
object_lock_bucketsintegerprotected plans: object lock bucket rights (billed every cycle)
namestringname (nickname); {n} = number in a batch
tagsarray<string>
project_idinteger | nullproject (0 = default project)
end_customer_idintegerreseller main key: assign to this end-customer
confirmboolean
dry_runboolean

Responses

200Dry-run quote
201Ordered and paid; services are being set up — data: object
402Account balance does not cover the order (insufficient_balance)
403Key lacks the scope, IP not allowed, or feature disabled
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 ...)
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/storage' \
  -H "Authorization: Bearer $GYRO_TOKEN" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{"plan": "standard-1tb", "cycle": "monthly", "name": "gyro-proje-s3", "extra_traffic": "1tb", "confirm": true}'
gyro storage create --help    # all flags
# resource gyro_storage: https://registry.terraform.io/providers/gyro-hosting/gyro/latest/docs/resources/storage
# Object Storage (S3) 1 TB, billed monthly from the account balance
resource "gyro_storage" "yedek" {
  plan  = "standard-1tb"
  cycle = "monthly"
  name  = "gyro-proje-yedek"

  # destroy deletes every bucket and object of the service
  lifecycle {
    prevent_destroy = true
  }
}

# Protected Storage with 2 object lock (WORM) buckets
resource "gyro_storage" "worm" {
  plan                = "protected-250gb"
  cycle               = "annually"
  object_lock_buckets = 2
}

resource "gyro_storage_bucket" "dosyalar" {
  service_id = gyro_storage.yedek.service_id
  name       = "gyro-proje-dosyalar"
}
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/storage", headers=h, json={"plan": "standard-1tb", "cycle": "monthly", "name": "gyro-proje-s3", "extra_traffic": "1tb", "confirm": True}, timeout=60)
r.raise_for_status()
print(r.json()["data"])
const res = await fetch("https://www.gyrohosting.com/api/v1/client/cloud/storage", {
  method: "POST",
  headers: {
    "Authorization": `Bearer ${process.env.GYRO_TOKEN}`,
    "Content-Type": "application/json",
    "Idempotency-Key": crypto.randomUUID(),
  },
  body: JSON.stringify({"plan": "standard-1tb", "cycle": "monthly", "name": "gyro-proje-s3", "extra_traffic": "1tb", "confirm": true}),
});
const { data, error } = await res.json();
if (!res.ok) throw new Error(`${error.code}: ${error.message}`);

#GET/cloud/storage/{id}

Get a storage serviceScope: services_readgetStorageServiceOpenAPI for this operation

Service row plus storage (plan, kind, limits, S3 endpoint, region).

Parameters

FieldinTypeDescription
id requiredpathintegerStorage service id

Responses

200OK
404Not found — also returned for objects owned by someone else

Examples

curl -s 'https://www.gyrohosting.com/api/v1/client/cloud/storage/12345' \
  -H "Authorization: Bearer $GYRO_TOKEN"
gyro storage get 12345
# resource gyro_storage: https://registry.terraform.io/providers/gyro-hosting/gyro/latest/docs/resources/storage
# Object Storage (S3) 1 TB, billed monthly from the account balance
resource "gyro_storage" "yedek" {
  plan  = "standard-1tb"
  cycle = "monthly"
  name  = "gyro-proje-yedek"

  # destroy deletes every bucket and object of the service
  lifecycle {
    prevent_destroy = true
  }
}

# Protected Storage with 2 object lock (WORM) buckets
resource "gyro_storage" "worm" {
  plan                = "protected-250gb"
  cycle               = "annually"
  object_lock_buckets = 2
}

resource "gyro_storage_bucket" "dosyalar" {
  service_id = gyro_storage.yedek.service_id
  name       = "gyro-proje-dosyalar"
}
import os, uuid, requests

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

Cancel a storage serviceScope: cloud_deletedeleteStorageServiceOpenAPI for this operation

confirm=true is required. immediate=true cancels now: access keys, website and custom domains stop within about a minute and every bucket and object is deleted permanently within minutes (cannot be undone; Protected Storage versions under a COMPLIANCE lock or legal hold are kept until the lock ends and stay billable). Without immediate a cancellation request is filed and the service keeps running until it is processed.

Parameters

FieldinTypeDescription
id requiredpathintegerStorage service id
confirm requiredqueryboolean
immediatequeryboolean

Responses

202cancelling | cancellation_requested
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 DELETE 'https://www.gyrohosting.com/api/v1/client/cloud/storage/12345' \
  -H "Authorization: Bearer $GYRO_TOKEN"
gyro storage delete 12345
# resource gyro_storage: https://registry.terraform.io/providers/gyro-hosting/gyro/latest/docs/resources/storage
# Object Storage (S3) 1 TB, billed monthly from the account balance
resource "gyro_storage" "yedek" {
  plan  = "standard-1tb"
  cycle = "monthly"
  name  = "gyro-proje-yedek"

  # destroy deletes every bucket and object of the service
  lifecycle {
    prevent_destroy = true
  }
}

# Protected Storage with 2 object lock (WORM) buckets
resource "gyro_storage" "worm" {
  plan                = "protected-250gb"
  cycle               = "annually"
  object_lock_buckets = 2
}

resource "gyro_storage_bucket" "dosyalar" {
  service_id = gyro_storage.yedek.service_id
  name       = "gyro-proje-dosyalar"
}
import os, uuid, requests

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