# Αναφορά API: Διακομιστές, αιτήματα και ομάδες

Διακομιστές, αιτήματα και ομάδες: όλες οι λειτουργίες του API v1 με το απαιτούμενο scope, τις παραμέτρους, παραδείγματα σε curl, JavaScript και Python και τις απαντήσεις. Η ταυτοποίηση, τα σφάλματα, η σελιδοποίηση, τα όρια και η αυτοδυναμία περιγράφονται στην [επισκόπηση της αναφοράς API](/docs/api-reference)· δείτε και τα [SDK](/docs/sdks) και τη [γραμμή εντολών](/docs/cli).

> Δοκιμάστε το με το κλειδί σας: δημιουργήστε ένα κλειδί API στην κονσόλα, εκτελέστε `export APIDLY_API_KEY=...` στο τερματικό και επικολλήστε οποιοδήποτε παράδειγμα curl παρακάτω. Οι τιμές των παραδειγμάτων είναι ενδεικτικές. Σε αυτή τη σελίδα δεν υπάρχει πεδίο για εισαγωγή κλειδιού.

Οι περιγραφές των λειτουργιών και των πεδίων προέρχονται από τον ορισμό του API και είναι στα αγγλικά.

| Λειτουργία | Απαιτούμενο scope | Περίληψη |
| --- | --- | --- |
| `GET /servers` | `read` | Οι διακομιστές σας, οι νεότεροι πρώτα |
| `POST /servers` | `servers` | Αίτημα νέου διακομιστή |
| `POST /servers/{id}/clone` | `servers` | Εκκίνηση αντιγράφου διακομιστή |
| `POST /servers/{id}/template` | `full` | Αποθήκευση των ρυθμίσεων εκκίνησης ενός διακομιστή ως προτύπου |
| `GET /servers/{id}/launch-file` | `read` | Εξαγωγή των ρυθμίσεων εκκίνησης ενός διακομιστή σε επαναχρησιμοποιήσιμο αρχείο |
| `GET /servers/{id}/benchmarks` | `read` | Benchmarks run on this server |
| `POST /servers/{id}/benchmarks` | `servers` | Record a benchmark you ran on this server |
| `POST /servers/{id}/avoid-machine` | `servers` | Να μην τοποθετούνται ποτέ ξανά οι διακομιστές σας στο μηχάνημα αυτού του διακομιστή |
| `GET /avoided-machines` | `read` | Μηχανήματα που αποφεύγει ο οργανισμός σας |
| `DELETE /avoided-machines/{id}` | `servers` | Διακοπή αποφυγής ενός μηχανήματος |
| `GET /servers/{id}` | `read` | Ένας διακομιστής |
| `PATCH /servers/{id}` | `servers` | Μετονομασία διακομιστή ή επεξεργασία των ετικετών του |
| `DELETE /servers/{id}` | `servers` | Διαγραφή διακομιστή και του δίσκου του |
| `POST /servers/tags` | `servers` | Προσθήκη ή αφαίρεση ετικετών σε πολλούς διακομιστές |
| `POST /servers/bulk` | `servers` | Εκκίνηση, διακοπή, επανεκκίνηση ή διαγραφή πολλών διακομιστών |
| `POST /servers/{id}/{action}` | `servers` | Εκκίνηση, διακοπή ή επανεκκίνηση διακομιστή |
| `GET /servers/{id}/logs` | `read` | Πρόσφατες γραμμές καταγραφής |
| `POST /servers/{id}/exec` | `servers` | Εκτέλεση μίας εντολής σε διακομιστή που έχει σταματήσει |
| `POST /servers/{id}/terminal` | `servers` | Διεύθυνση και κωδικός του τερματικού προγράμματος περιήγησης του διακομιστή |
| `GET /servers/{id}/events` | `read` | Συμβάντα κύκλου ζωής ενός διακομιστή, τα νεότερα πρώτα |
| `GET /servers/{id}/automation` | `read` | Κανόνες αυτοματισμού ενός διακομιστή |
| `PUT /servers/{id}/automation` | `servers` | Ορισμός ή εκκαθάριση κανόνων αυτοματισμού |
| `DELETE /servers/{id}/automation` | `servers` | Εκκαθάριση όλων των κανόνων αυτοματισμού ενός διακομιστή |
| `POST /servers/{id}/recreate` | `servers` | Επαναδημιουργία του κοντέινερ από μια πρόσφατα ληφθείσα εικόνα |
| `POST /servers/{id}/recycle` | `servers` | Παρωχημένο: χρησιμοποιήστε POST /servers/{id}/recreate |
| `GET /servers/{id}/max-price` | `read` | Διακομιστής με δυνατότητα διακοπής: η μέγιστη τιμή και το ανώτατο όριο στο οποίο μπορεί να αυξηθεί |
| `POST /servers/{id}/max-price` | `full` | Αύξηση της μέγιστης τιμής ενός διακομιστή με δυνατότητα διακοπής |
| `POST /servers/{id}/hard-reboot` | `servers` | Διακοπή ενός διακομιστή που εκτελείται και νέα εκκίνησή του |
| `GET /servers/{id}/usage` | `read` | Ωριαίες χρεώσεις ενός διακομιστή |
| `GET /servers/{id}/ssh-keys` | `read` | Αποθηκευμένα κλειδιά SSH, με ένδειξη αν το καθένα υπάρχει σε αυτόν τον διακομιστή |
| `POST /servers/{id}/ssh-keys` | `full` | Σύνδεση αποθηκευμένου κλειδιού SSH σε διακομιστή που εκτελείται |
| `DELETE /servers/{id}/ssh-keys/{keyId}` | `full` | Αφαίρεση αποθηκευμένου κλειδιού SSH από διακομιστή που εκτελείται |
| `GET /servers/{id}/metrics` | `read` | Δείγματα χρήσης ενός διακομιστή |
| `GET /servers/{id}/logs/download` | `read` | Οι τελευταίες 1000 γραμμές καταγραφής ως αρχείο κειμένου |
| `GET /servers/{id}/automation/calendar` | `read` | Προγραμματισμένες εκκινήσεις και διακοπές ως αρχείο ημερολογίου |
| `GET /servers/{id}/portal-health` | `read` | Αν απαντά κάθε θύρα ενός διακομιστή σε λειτουργία |
| `GET /deployments` | `read` | Αιτήματα διακομιστή, τα νεότερα πρώτα |
| `GET /deployments/{id}` | `read` | Ένα αίτημα διακομιστή |
| `POST /deployments/{id}/cancel` | `servers` | Ακύρωση αιτήματος που περιμένει έγκριση |
| `POST /deployments/{id}/launch-again` | `servers` | Νέα εκκίνηση με τις ρυθμίσεις προηγούμενου αιτήματος |
| `GET /groups` | `read` | Ομάδες διακομιστών |
| `POST /groups` | `full` | Δημιουργία ομάδας διακομιστών |
| `GET /groups/{id}` | `read` | Μία ομάδα με τους διακομιστές της |
| `PATCH /groups/{id}` | `full` | Ενημέρωση ομάδας διακομιστών |
| `DELETE /groups/{id}` | `full` | Διαγραφή ομάδας (οι διακομιστές της συνεχίζουν να εκτελούνται, χωρίς διαχείριση) |
| `POST /groups/{id}/{action}` | `servers` | Παύση ή συνέχιση ομάδας |

## Διακομιστές

### GET /servers

Οι διακομιστές σας, οι νεότεροι πρώτα

Optional filters: `status` (comma-separated, for example `running,stopped`; naming `destroyed` also lists destroyed servers), `pricing`, `tag` (comma-separated; a server must carry every tag listed, for example `tag=team-a,batch`) and `q` (up to 60 characters, case-insensitive, found in the id, label, GPU model, note or any tag). Repeat the same filters on every page so the `cursor` stays valid.

**Απαιτούμενο scope:** `read`

**Παράμετροι**

| Όνομα | Σε | Τύπος | Υποχρεωτικό | Περιγραφή |
| --- | --- | --- | --- | --- |
| `limit` | query | integer | όχι |  |
| `cursor` | query | string | όχι |  |
| `includeDestroyed` | query | `0` \| `1` \| `true` \| `false` | όχι |  |
| `status` | query | string | όχι |  |
| `pricing` | query | `on_demand` \| `interruptible` | όχι |  |
| `q` | query | string | όχι |  |
| `tag` | query | string | όχι |  |

**Παράδειγμα αιτήματος (curl)**

```bash
curl "https://apidly.com/api/v1/servers?limit=20" \
  -H "Authorization: Bearer $APIDLY_API_KEY"
```

**JavaScript (SDK)**

```js
await apidly.servers.list({ limit: 20 });
```

**Python (SDK)**

```python
client.servers.list()
```

**Εργαλείο γραμμής εντολών:** `apidly status`, `apidly doctor`, `apidly servers`, `apidly ssh-config`, `apidly export`, `apidly plan`, `apidly apply` ([Αναφορά CLI](/docs/cli))

**Παράδειγμα απάντησης** (200)

```json
{
  "servers": [
    {
      "id": "example",
      "deploymentId": "id_example",
      "planId": "id_example",
      "templateId": "id_example",
      "label": "example",
      "tags": [
        "example"
      ],
      "note": "example",
      "status": "provisioning",
      "pricing": "on_demand",
      "maxHourlyPriceMicros": "1000000",
      "maxHourlyPriceUsd": "1.000000",
      "interruptedAt": "2026-11-21T10:00:00.000Z",
      "statusMessage": "example",
      "statusReason": "example",
      "startError": "gpu_unsupported",
      "startWarning": "gpu_unsupported",
      "startProgress": {
        "stage": "downloading_image",
        "minutes": 1,
        "elapsedMinutes": 1,
        "percent": 1,
        "message": "example"
      },
      "setupState": "finishing",
      "launchAttempt": {
        "n": 1,
        "of": 1
      },
      "availableUntil": "2026-11-21T10:00:00.000Z",
      "gpuModel": "example",
      "gpuCount": 1,
      "hardware": {
        "cpuName": null,
        "cudaMax": null,
        "diskBwMBs": null,
        "diskName": null,
        "driverVersion": null,
        "gpuMemBwGBs": null,
        "hosting": null,
        "netDownMbps": null,
        "netUpMbps": null,
        "regionGroup": null
      },
      "vramGb": 1,
      "vcpus": 1,
      "ramGb": 1,
      "diskGb": 1,
      "region": "South Korea",
      "regionCode": "KR",
      "continent": "asia",
      "autoExtend": false,
      "keepOnStartError": false,
      "launchMode": "ssh",
      "hourlyPriceMicros": "1000000",
      "hourlyPriceUsd": "1.000000",
      "storageHourlyMicros": "1000000",
      "storageHourlyUsd": "1.000000",
      "reservedUntil": "2026-11-21T10:00:00.000Z",
      "startedAt": "2026-11-21T10:00:00.000Z",
      "stoppedAt": "2026-11-21T10:00:00.000Z",
      "destroyedAt": "2026-11-21T10:00:00.000Z",
      "createdAt": "2026-11-21T10:00:00.000Z",
      "connection": {
        "key": null
      },
      "metrics": {
        "at": null,
        "cpuUtilPct": null,
        "ramUsedMb": null,
        "ramTotalMb": null,
        "gpuUtilPct": null,
        "gpuMemUsedMb": null,
        "gpuMemTotalMb": null,
        "gpuTempC": null,
        "diskUsedPct": null,
        "diskTotalGb": null
      },
      "requested": {
        "planId": null,
        "templateId": null,
        "diskGb": null,
        "pricing": null,
        "fallbackPlanIds": null,
        "constraints": null,
        "allowSelfStop": null,
        "webTerminal": null,
        "sshKeyIds": null,
        "envKeys": null,
        "volumeId": null,
        "volumeMountPath": null,
        "automation": null
      }
    }
  ],
  "nextCursor": "example"
}
```

Καταστάσεις σφάλματος: `401`, `403`, `429`.

### POST /servers

Αίτημα νέου διακομιστή

201 with the deployment and the server, or 202 when our team reviews the request first (some new servers are reviewed before they start; `server` is null and nothing is charged until it runs). A launch that fails later shows as a deployment with `status: failed` and a `reason`, for example `price_moved`, plus `alternatives` (in-stock plans like it) when there are any. A plan that is out of stock answers 409 `plan_unavailable` with `error.alternatives` when other plans the same or better are in stock. Optional `automation` (the fields of `PUT /servers/{id}/automation`) is kept with the request and applied once the server exists, so an automatic stop is not lost while the request is reviewed; `automation.saved` in the answer says whether it was stored (403 `forbidden` up front when the key's creator lacks `automation.manage`). Organization launch defaults (`GET /organization/defaults`) fill what the request leaves out: no `sshKeyIds` installs the default SSH keys, no `automation` adds the default automatic stop (`automation.fromDefaults: true`; an organization setting, so it needs no `automation.manage`). Send `sshKeyIds: []` or `automation: {}` to opt out for one launch. `?dryRun=1` runs every check and answers 200 with `quote` (the hourly price the request would lock, and `blockers` such as `insufficient_balance` that would refuse it today) without creating, charging or recording anything; it has its own rate limit (30 a minute per key).

**Απαιτούμενο scope:** `servers` · **Ασφαλής επανάληψη με:** `Idempotency-Key`

**Παράμετροι**

| Όνομα | Σε | Τύπος | Υποχρεωτικό | Περιγραφή |
| --- | --- | --- | --- | --- |
| `dryRun` | query | `0` \| `1` \| `true` \| `false` | όχι | 1 or true: run every check of the request and answer the price it would lock (`quote`), without creating, charging or recording anything. Balance and budget problems are listed in `quote.blockers` instead of refusing. |

**Σώμα αιτήματος**

| Όνομα | Τύπος | Υποχρεωτικό | Περιγραφή |
| --- | --- | --- | --- |
| `planId` | string | ναι |  |
| `templateId` | string | ναι |  |
| `label` | string | ναι |  |
| `diskGb` | integer | ναι |  |
| `sshKeyIds` | πίνακας από string | όχι | SSH keys to install (ids from `GET /ssh-keys`). Left out: the organization's default keys (`GET /organization/defaults`), or none. Send `[]` for no key. |
| `env` | object | όχι |  |
| `volumeId` | string | όχι |  |
| `volumeMountPath` | string | όχι |  |
| `constraints` | object | όχι |  |
| `pricing` | `on_demand` \| `interruptible` | όχι |  |
| `fallbackPlanIds` | πίνακας από string | όχι |  |
| `allowSelfStop` | boolean | όχι |  |
| `webTerminal` | boolean | όχι |  |
| `tags` | πίνακας από string | όχι |  |
| `variableSetIds` | πίνακας από string | όχι | Saved variable sets to attach (ids or names from `GET /variable-sets`, at most 5). Their variables are added as secret values; a later set wins over an earlier one, and a variable given in `env` wins over every set. 404 `feature_unavailable` while variable sets are off. |
| `automation` | object | όχι | Automation rules for the new server, the same fields as `PUT /servers/{id}/automation` (for example `{ "maxRuntimeHours": 2 }`). Kept with the request while it waits for review and applied once the server exists. Needs `automation.manage`; a scheduled destroy also needs the destroy permission. |

**Παράδειγμα αιτήματος (curl)**

```bash
curl -X POST "https://apidly.com/api/v1/servers" \
  -H "Authorization: Bearer $APIDLY_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"planId":"id_example","templateId":"id_example","label":"example","diskGb":1}'
```

**JavaScript (SDK)**

```js
await apidly.servers.create({
  planId: "id_example",
  templateId: "id_example",
  label: "example",
  diskGb: 1
});
```

**Python (SDK)**

```python
client.servers.create(plan_id="id_example", template_id="id_example", label="example", disk_gb=1)
```

**Εργαλείο γραμμής εντολών:** `apidly up`, `apidly run`, `apidly deploy`, `apidly apply` ([Αναφορά CLI](/docs/cli))

**Παράδειγμα απάντησης** (200)

```json
{
  "dryRun": true,
  "quote": {
    "planId": "id_example",
    "templateId": "id_example",
    "diskGb": 1,
    "pricing": "on_demand",
    "hourlyPriceMicros": "1000000",
    "hourlyPriceUsd": "1.000000",
    "storageHourlyMicros": "1000000",
    "storageHourlyUsd": "1.000000",
    "totalHourlyMicros": "1000000",
    "totalHourlyUsd": "1.000000",
    "consentHourlyMicros": "1000000",
    "consentHourlyUsd": "1.000000",
    "balanceMicros": "1000000",
    "balanceUsd": "1.000000",
    "requiredBalanceMicros": "1000000",
    "requiredBalanceUsd": "1.000000",
    "blockers": [
      {
        "code": "example",
        "message": "example"
      }
    ]
  }
}
```

Καταστάσεις σφάλματος: `400`, `401`, `402`, `403`, `404`, `409`, `422`, `429`, `503`.

### POST /servers/{id}/clone

Εκκίνηση αντιγράφου διακομιστή

A new server with the settings this server was launched with and its current tags, labelled "<label> copy" unless you send `label`. The source server is not touched. Copied: plan, template, disk size, SSH keys, environment variables and secret values, port and start-command overrides, hardware requirements, fallback plans, pricing mode (on-demand or interruptible), the self-stop key option and the browser terminal (while the platform offers it). Not copied: the volume (a volume belongs to one server at a time), automation rules, files on the disk, and per-server credentials (the new server gets its own terminal password and self-stop key). Every rule of `POST /servers` applies again: today's price, the balance check, review of a new organization's first server and capacity, so the answer is the same 201 or 202 as `POST /servers` (409 `plan_unavailable` with `error.alternatives` when the plan is out of stock). Optional body `{ "label": "..." }`. Environment variable values are cleared 24 hours after a server is destroyed (Privacy Policy): repeating a launch after that answers 409 `secret_values_cleared` with the variable names in `error.names` until you send their values again in `secretEnv` (`{ "NAME": "value" }`); they are stored as secret values of the new request. Servers of a serverless endpoint or a server group answer 409 `invalid_state`: change the endpoint or group instead. A copy carries the secret values, so a member whose role covers only their own servers can copy only their own launches (404 otherwise).

**Απαιτούμενο scope:** `servers` · **Δικαίωμα:** `servers.deploy` · **Ασφαλής επανάληψη με:** `Idempotency-Key`

**Παράμετροι**

| Όνομα | Σε | Τύπος | Υποχρεωτικό | Περιγραφή |
| --- | --- | --- | --- | --- |
| `id` | path | string | ναι |  |

**Σώμα αιτήματος**

| Όνομα | Τύπος | Υποχρεωτικό | Περιγραφή |
| --- | --- | --- | --- |
| `label` | string | όχι |  |
| `secretEnv` | object | όχι |  |

**Παράδειγμα αιτήματος (curl)**

```bash
curl -X POST "https://apidly.com/api/v1/servers/ins_example/clone" \
  -H "Authorization: Bearer $APIDLY_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"label":"example","secretEnv":{}}'
```

**JavaScript (SDK)**

```js
await apidly.servers.clone("ins_example");
```

**Python (SDK)**

```python
client.servers.clone("ins_example")
```

**Εργαλείο γραμμής εντολών:** `apidly clone` ([Αναφορά CLI](/docs/cli))

**Παράδειγμα απάντησης** (201)

```json
{
  "deployment": {
    "id": "example",
    "planId": "id_example",
    "templateId": "id_example",
    "label": "example",
    "tags": [
      "example"
    ],
    "diskGb": 1,
    "sshKeyIds": [
      "example"
    ],
    "envKeys": [
      "example"
    ],
    "status": "pending_approval",
    "reason": "example",
    "startError": "gpu_unsupported",
    "statusMessage": "example",
    "chargedMicros": "1000000",
    "chargedUsd": "1.000000",
    "chargedSeconds": 1,
    "refundedMicros": "1000000",
    "refundedUsd": "1.000000",
    "hourlyPriceMicros": "1000000",
    "hourlyPriceUsd": "1.000000",
    "storageHourlyMicros": "1000000",
    "storageHourlyUsd": "1.000000",
    "pricing": "on_demand",
    "fallbackPlanIds": [
      "example"
    ],
    "alternatives": [
      {
        "planId": "id_example",
        "name": "example",
        "hourlyPriceMicros": "1000000",
        "hourlyPriceUsd": "1.000000",
        "withinAgreed": false
      }
    ],
    "allowSelfStop": false,
    "instanceId": "id_example",
    "serverId": "id_example",
    "requested": {
      "planId": "id_example",
      "templateId": "id_example",
      "diskGb": 1,
      "pricing": "on_demand",
      "fallbackPlanIds": [
        "example"
      ],
      "constraints": {
        "region": "na",
        "hosting": "datacenter",
        "reliability": "high",
        "minCpuCores": 1,
        "minRamGb": 1,
        "minDownMbps": 1,
        "minUpMbps": 1,
        "minCudaMajor": 11,
        "directPorts": false
      },
      "allowSelfStop": false,
      "webTerminal": false,
      "sshKeyIds": [
        "example"
      ],
      "envKeys": [
        "example"
      ],
      "volumeId": "id_example",
      "volumeMountPath": "example",
      "automation": {
        "maxRuntimeHours": null,
        "idle": null,
        "destroyAt": null,
        "stopAt": null,
        "spendCapCents": null,
        "schedule": null
      }
    },
    "decidedAt": "2026-11-21T10:00:00.000Z",
    "createdAt": "2026-11-21T10:00:00.000Z"
  },
  "server": {
    "id": "example",
    "deploymentId": "id_example",
    "planId": "id_example",
    "templateId": "id_example",
    "label": "example",
    "tags": [
      "example"
    ],
    "note": "example",
    "status": "provisioning",
    "pricing": "on_demand",
    "maxHourlyPriceMicros": "1000000",
    "maxHourlyPriceUsd": "1.000000",
    "interruptedAt": "2026-11-21T10:00:00.000Z",
    "statusMessage": "example",
    "statusReason": "example",
    "startError": "gpu_unsupported",
    "startWarning": "gpu_unsupported",
    "startProgress": {
      "stage": "downloading_image",
      "minutes": 1,
      "elapsedMinutes": 1,
      "percent": 1,
      "message": "example"
    },
    "setupState": "finishing",
    "launchAttempt": {
      "n": 1,
      "of": 1
    },
    "availableUntil": "2026-11-21T10:00:00.000Z",
    "gpuModel": "example",
    "gpuCount": 1,
    "hardware": {
      "cpuName": null,
      "cudaMax": null,
      "diskBwMBs": null,
      "diskName": null,
      "driverVersion": null,
      "gpuMemBwGBs": null,
      "hosting": null,
      "netDownMbps": null,
      "netUpMbps": null,
      "regionGroup": null
    },
    "vramGb": 1,
    "vcpus": 1,
    "ramGb": 1,
    "diskGb": 1,
    "region": "South Korea",
    "regionCode": "KR",
    "continent": "asia",
    "autoExtend": false,
    "keepOnStartError": false,
    "launchMode": "ssh",
    "hourlyPriceMicros": "1000000",
    "hourlyPriceUsd": "1.000000",
    "storageHourlyMicros": "1000000",
    "storageHourlyUsd": "1.000000",
    "reservedUntil": "2026-11-21T10:00:00.000Z",
    "startedAt": "2026-11-21T10:00:00.000Z",
    "stoppedAt": "2026-11-21T10:00:00.000Z",
    "destroyedAt": "2026-11-21T10:00:00.000Z",
    "createdAt": "2026-11-21T10:00:00.000Z",
    "connection": {
      "key": null
    },
    "metrics": {
      "at": null,
      "cpuUtilPct": null,
      "ramUsedMb": null,
      "ramTotalMb": null,
      "gpuUtilPct": null,
      "gpuMemUsedMb": null,
      "gpuMemTotalMb": null,
      "gpuTempC": null,
      "diskUsedPct": null,
      "diskTotalGb": null
    },
    "requested": {
      "planId": null,
      "templateId": null,
      "diskGb": null,
      "pricing": null,
      "fallbackPlanIds": null,
      "constraints": null,
      "allowSelfStop": null,
      "webTerminal": null,
      "sshKeyIds": null,
      "envKeys": null,
      "volumeId": null,
      "volumeMountPath": null,
      "automation": null
    }
  },
  "sourceServerId": "id_example"
}
```

Καταστάσεις σφάλματος: `400`, `401`, `402`, `403`, `404`, `409`, `429`, `503`.

### POST /servers/{id}/template

Αποθήκευση των ρυθμίσεων εκκίνησης ενός διακομιστή ως προτύπου

Creates a private template of your organization from the settings this server was launched with: image and tag, launch mode, container arguments, start script (the launch's override, else the template's), ports (without the browser-terminal port), disk size as the default disk, hardware needs, endpoint facts, and the environment variable names. The registry login is kept only when the source template is your organization's own. The server is not touched and may be in any state. Optional body `{ "name": "...", "summary": "..." }`; `name` defaults to the server's label. Secret rule: plain values are copied; secret values are never copied: every secret (of the template or of the launch, and any plain variable whose name looks like a key, token or password) is saved by name with an empty value and listed in `secretsToFill`, to be filled in on the template (`PATCH /templates/{id}`) or as a launch secret of the same name; a value that points at your secrets store (`secret:NAME`) is kept as that reference and listed in `secretRefs`; variables the platform sets for each server (terminal password, self-stop key, server facts) are left out. Values (plain values, store references and the start-script override) are copied only when the key's creator launched the server or holds `servers.manage`; otherwise every variable is saved by name with an empty value (all in `secretsToFill`), the start script is the source template's own, and `valuesCopied` is false. The answer repeats the rule in `secretRule`. 409 `name_taken` when another of your templates has the same name (case-insensitive), 409 `limit_reached` at the template limit, 409 `invalid_state` for a server of a serverless endpoint or a server group, 404 for a server outside your organization (or, for a member whose role covers only their own servers, another member's server). 10 calls a minute per key.

**Απαιτούμενο scope:** `full` · **Δικαίωμα:** `templates.manage` · **Ασφαλής επανάληψη με:** `Idempotency-Key`

**Παράμετροι**

| Όνομα | Σε | Τύπος | Υποχρεωτικό | Περιγραφή |
| --- | --- | --- | --- | --- |
| `id` | path | string | ναι |  |

**Σώμα αιτήματος**

| Όνομα | Τύπος | Υποχρεωτικό | Περιγραφή |
| --- | --- | --- | --- |
| `name` | string | όχι |  |
| `summary` | string | όχι |  |

**Παράδειγμα αιτήματος (curl)**

```bash
curl -X POST "https://apidly.com/api/v1/servers/ins_example/template" \
  -H "Authorization: Bearer $APIDLY_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"name":"example","summary":"example"}'
```

**JavaScript (SDK)**

```js
await apidly.servers.saveAsTemplate("ins_example");
```

**Python (SDK)**

```python
client.servers.save_as_template("ins_example")
```

**Εργαλείο γραμμής εντολών:** `apidly templates` ([Αναφορά CLI](/docs/cli))

**Παράδειγμα απάντησης** (201)

```json
{
  "template": {
    "id": "example",
    "slug": "example",
    "name": "example",
    "summary": "example",
    "category": "example",
    "image": "docker.io/library/ubuntu",
    "tag": "example",
    "launchMode": "ssh",
    "env": {
      "key": "example"
    },
    "ports": [
      {
        "port": 1,
        "protocol": "tcp",
        "label": "example"
      }
    ],
    "startScript": "example",
    "onStart": "example",
    "args": "example",
    "description": "example",
    "secretEnvKeys": [
      "example"
    ],
    "registryId": "id_example",
    "appPort": 1,
    "defaultDiskGb": 1,
    "minVramGb": 1,
    "recommendedVramGb": 1,
    "constraints": {
      "key": null
    },
    "latestCudaTag": false,
    "inference": {
      "api": "http",
      "healthPath": "example",
      "port": 1
    },
    "custom": false,
    "firstBootMinutes": 1,
    "revision": 1,
    "sort": 1,
    "createdAt": "2026-11-21T10:00:00.000Z"
  },
  "sourceServerId": "id_example",
  "secretsToFill": [
    "example"
  ],
  "secretRefs": [
    "example"
  ],
  "secretRule": "example",
  "valuesCopied": false
}
```

Καταστάσεις σφάλματος: `400`, `401`, `403`, `404`, `409`, `429`.

### GET /servers/{id}/launch-file

Εξαγωγή των ρυθμίσεων εκκίνησης ενός διακομιστή σε επαναχρησιμοποιήσιμο αρχείο

The body of `POST /servers` that launches a server like this one: plan, template, label, disk size, SSH keys, environment variables, hardware requirements, fallback plans, pricing mode, the self-stop key option, the browser terminal (while the platform offers it), the server's current tags and its repeating automation rules (maximum runtime, idle stop, spend cap, weekly schedule). Keep `launchFile` in a file and send it to `POST /servers` (or `apidly deploy -f FILE`) to launch again; every rule of `POST /servers` applies then (today's price, balance, review, capacity). Nothing is created by this call. Secret rule: plain values are copied, references to your secrets store (`secret:NAME`) stay references (`secretRefs`), and secret values (launch secrets, and plain variables whose name looks like a key, token or password) are never written into the file: their names are in `secretsToFill`, to be sent as `env` when you launch. Variables the platform sets for each server are left out. Values are copied only when the key's creator launched the server or holds `servers.manage`; otherwise `env` is empty, every name is in `secretsToFill` and `valuesCopied` is false. `notCopied` names what the file cannot carry: `volume` (a volume belongs to one server at a time), `one_off_times` (a planned stop or destroy moment), `port_overrides` and `start_command` (not part of `POST /servers`). 409 `invalid_state` for a server with no saved launch settings, or one of a serverless endpoint or server group; 404 for a server outside your organization (or, for a member whose role covers only their own servers, another member's server). The export is recorded in the audit log (variable names only). 30 calls a minute per key.

**Απαιτούμενο scope:** `read` · **Δικαίωμα:** `servers.view`

**Παράμετροι**

| Όνομα | Σε | Τύπος | Υποχρεωτικό | Περιγραφή |
| --- | --- | --- | --- | --- |
| `id` | path | string | ναι |  |

**Παράδειγμα αιτήματος (curl)**

```bash
curl "https://apidly.com/api/v1/servers/ins_example/launch-file" \
  -H "Authorization: Bearer $APIDLY_API_KEY"
```

**JavaScript (SDK)**

```js
await apidly.servers.launchFile("ins_example");
```

**Python (SDK)**

```python
client.servers.launch_file("ins_example")
```

**Εργαλείο γραμμής εντολών:** `apidly servers` ([Αναφορά CLI](/docs/cli))

**Παράδειγμα απάντησης** (200)

```json
{
  "launchFile": {
    "planId": "id_example",
    "templateId": "id_example",
    "label": "example",
    "diskGb": 1,
    "sshKeyIds": [
      "example"
    ],
    "env": {
      "key": "example"
    },
    "volumeId": "id_example",
    "volumeMountPath": "example",
    "constraints": {
      "region": "na",
      "hosting": "datacenter",
      "reliability": "high",
      "minCpuCores": 1,
      "minRamGb": 1,
      "minDownMbps": 1,
      "minUpMbps": 1,
      "minCudaMajor": 11,
      "directPorts": false
    },
    "pricing": "on_demand",
    "fallbackPlanIds": [
      "example"
    ],
    "allowSelfStop": false,
    "webTerminal": false,
    "tags": [
      "example"
    ],
    "variableSetIds": [
      "example"
    ],
    "automation": {
      "maxRuntimeHours": 0.25,
      "idle": {
        "thresholdPct": null,
        "minutes": null
      },
      "destroyAt": "2026-11-21T10:00:00.000Z",
      "stopAt": "2026-11-21T10:00:00.000Z",
      "spendCapCents": 10,
      "schedule": {
        "timezone": null,
        "windows": null
      }
    }
  },
  "sourceServerId": "id_example",
  "secretsToFill": [
    "example"
  ],
  "secretRefs": [
    "example"
  ],
  "valuesCopied": false,
  "notCopied": [
    "volume"
  ]
}
```

Καταστάσεις σφάλματος: `401`, `403`, `404`, `409`, `429`.

### GET /servers/{id}/benchmarks

Benchmarks run on this server

Newest first, at most `max` (20). Each figure comes with our measured median of the same GPU class (`reference`, null when we have not measured that class) and the run's figure as a percentage of it, so you can tell whether this machine performs like others of its kind. Runs are recorded with `POST /servers/{id}/benchmarks` (the CLI's `apidly servers benchmark ID` runs the script over your SSH and records it). Self-reported: only your organization sees them. 404 for a server outside your organization (or, for a member whose role covers only their own servers, another member's server).

**Απαιτούμενο scope:** `read` · **Δικαίωμα:** `servers.view`

**Παράμετροι**

| Όνομα | Σε | Τύπος | Υποχρεωτικό | Περιγραφή |
| --- | --- | --- | --- | --- |
| `id` | path | string | ναι |  |

**Παράδειγμα αιτήματος (curl)**

```bash
curl "https://apidly.com/api/v1/servers/ins_example/benchmarks" \
  -H "Authorization: Bearer $APIDLY_API_KEY"
```

**JavaScript (SDK)**

```js
await apidly.servers.benchmarks("ins_example");
```

**Python (SDK)**

```python
client.servers.benchmarks("ins_example")
```

**Εργαλείο γραμμής εντολών:** `apidly servers` ([Αναφορά CLI](/docs/cli))

**Παράδειγμα απάντησης** (200)

```json
{
  "runs": [
    {
      "id": "example",
      "serverId": "id_example",
      "suite": "gpu-bench",
      "version": "example",
      "source": "self_reported",
      "gpuName": "example",
      "environment": {
        "driver": "example",
        "cuda": "example",
        "torch": "example",
        "gpuCountVisible": 1,
        "vramMb": 1
      },
      "measuredAt": "2026-11-21T10:00:00.000Z",
      "recordedAt": "2026-11-21T10:00:00.000Z",
      "wallSeconds": 1,
      "results": [
        {
          "id": null,
          "benchmark": null,
          "metric": null,
          "unit": null,
          "value": null,
          "sampleCount": null,
          "reference": null,
          "percentOfReference": null
        }
      ],
      "errors": [
        "example"
      ]
    }
  ],
  "max": 1
}
```

Καταστάσεις σφάλματος: `401`, `403`, `404`, `429`.

### POST /servers/{id}/benchmarks

Record a benchmark you ran on this server

Stores the JSON our open benchmark script printed (`suite` `gpu-bench`; the CLI command `apidly servers benchmark ID` downloads nothing: it carries the script, runs it over your SSH with `python3` and PyTorch, and sends the result here). The platform cannot run it for you: commands of the platform only work on a stopped server. Accepted tests: `matmul-fp16/tflops`, `matmul-fp32/tflops`, `vram-copy/gb_per_s`, `resnet50-infer/images_per_s`, `transformer-fwd/tokens_per_s`, each once with its unit; other fields of the script's output are ignored. At least one result or one error. The newest 20 runs of a server are kept. Figures are self-reported: only your organization sees them and they never enter a public figure. 201 with the stored run, compared with our median. 409 `invalid_state` for a deleted server, 404 for a server outside your organization (or another member's, for a role that covers only its own servers). 10 calls an hour per key.

**Απαιτούμενο scope:** `servers` · **Δικαίωμα:** `servers.manage`

**Παράμετροι**

| Όνομα | Σε | Τύπος | Υποχρεωτικό | Περιγραφή |
| --- | --- | --- | --- | --- |
| `id` | path | string | ναι |  |

**Σώμα αιτήματος**

| Όνομα | Τύπος | Υποχρεωτικό | Περιγραφή |
| --- | --- | --- | --- |
| `suite` | `gpu-bench` | ναι |  |
| `version` | string | ναι |  |
| `startedAt` | string | ναι |  |
| `finishedAt` | string | όχι |  |
| `wallSeconds` | number | όχι |  |
| `environment` | object | όχι |  |
| `results` | πίνακας από object | ναι |  |
| `errors` | πίνακας από string | όχι |  |

**Παράδειγμα αιτήματος (curl)**

```bash
curl -X POST "https://apidly.com/api/v1/servers/ins_example/benchmarks" \
  -H "Authorization: Bearer $APIDLY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"suite":"gpu-bench","version":"example","startedAt":"2026-11-21T10:00:00.000Z","results":[{"benchmark":"example","metric":"example","unit":"example","value":1,"sampleCount":1}]}'
```

**JavaScript (SDK)**

```js
await apidly.servers.recordBenchmark("ins_example", {
  suite: "gpu-bench",
  version: "example",
  startedAt: "2026-11-21T10:00:00.000Z",
  results: [
    {
      benchmark: "example",
      metric: "example",
      unit: "example",
      value: 1,
      sampleCount: 1
    }
  ]
});
```

**Python (SDK)**

```python
client.servers.record_benchmark("ins_example", result="example")
```

**Εργαλείο γραμμής εντολών:** `apidly servers` ([Αναφορά CLI](/docs/cli))

**Παράδειγμα απάντησης** (201)

```json
{
  "run": {
    "id": "example",
    "serverId": "id_example",
    "suite": "gpu-bench",
    "version": "example",
    "source": "self_reported",
    "gpuName": "example",
    "environment": {
      "driver": "example",
      "cuda": "example",
      "torch": "example",
      "gpuCountVisible": 1,
      "vramMb": 1
    },
    "measuredAt": "2026-11-21T10:00:00.000Z",
    "recordedAt": "2026-11-21T10:00:00.000Z",
    "wallSeconds": 1,
    "results": [
      {
        "id": "fp16",
        "benchmark": "example",
        "metric": "example",
        "unit": "example",
        "value": 1,
        "sampleCount": 1,
        "reference": {
          "median": null,
          "runs": null
        },
        "percentOfReference": 1
      }
    ],
    "errors": [
      "example"
    ]
  }
}
```

Καταστάσεις σφάλματος: `400`, `401`, `403`, `404`, `409`, `429`.

### POST /servers/{id}/avoid-machine

Να μην τοποθετούνται ποτέ ξανά οι διακομιστές σας στο μηχάνημα αυτού του διακομιστή

Adds the machine this server runs on (or ran on last) to your organization's avoided list: no later launch of the organization (new servers, clones, launch again, recreate, endpoint workers, group servers) is placed on it; the launch takes the next offer, at the price it would have had anyway. The server itself is not touched (destroy or recreate it if you want it elsewhere). The machine is never named: the entry refers to the server. Optional body `{ "reason": "..." }` (up to 200 characters, for your own list). 201 with the new entry; 200 with the existing entry when the machine is already avoided. 409 `invalid_state` when we have no record of a machine for this server (it never got one), 409 `volume_on_machine` while one of your volumes lives on that machine (a server can only mount a volume on its own machine), 409 `limit_reached` at 100 entries, 404 for a server outside your organization (or, for a member whose role covers only their own servers, another member's server). 10 calls a minute per key.

**Απαιτούμενο scope:** `servers` · **Δικαίωμα:** `servers.manage`

**Παράμετροι**

| Όνομα | Σε | Τύπος | Υποχρεωτικό | Περιγραφή |
| --- | --- | --- | --- | --- |
| `id` | path | string | ναι |  |

**Σώμα αιτήματος**

| Όνομα | Τύπος | Υποχρεωτικό | Περιγραφή |
| --- | --- | --- | --- |
| `reason` | string | όχι |  |

**Παράδειγμα αιτήματος (curl)**

```bash
curl -X POST "https://apidly.com/api/v1/servers/ins_example/avoid-machine" \
  -H "Authorization: Bearer $APIDLY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"reason":"example"}'
```

**JavaScript (SDK)**

```js
await apidly.servers.avoidMachine("ins_example");
```

**Python (SDK)**

```python
client.servers.avoid_machine("ins_example")
```

**Εργαλείο γραμμής εντολών:** `apidly avoided-machines` ([Αναφορά CLI](/docs/cli))

**Παράδειγμα απάντησης** (200)

```json
{
  "avoided": {
    "id": "example",
    "serverId": "id_example",
    "serverLabel": "example",
    "reason": "example",
    "createdAt": "2026-11-21T10:00:00.000Z"
  },
  "created": false
}
```

Καταστάσεις σφάλματος: `400`, `401`, `403`, `404`, `409`, `429`.

### GET /avoided-machines

Μηχανήματα που αποφεύγει ο οργανισμός σας

Oldest first, at most `max` (100). Each entry names the server it was marked from; the machine itself is never shown.

**Απαιτούμενο scope:** `read` · **Δικαίωμα:** `servers.view`

**Παράδειγμα αιτήματος (curl)**

```bash
curl "https://apidly.com/api/v1/avoided-machines" \
  -H "Authorization: Bearer $APIDLY_API_KEY"
```

**JavaScript (SDK)**

```js
await apidly.servers.listAvoidedMachines();
```

**Python (SDK)**

```python
client.servers.list_avoided_machines()
```

**Εργαλείο γραμμής εντολών:** `apidly avoided-machines` ([Αναφορά CLI](/docs/cli))

**Παράδειγμα απάντησης** (200)

```json
{
  "avoided": [
    {
      "id": "example",
      "serverId": "id_example",
      "serverLabel": "example",
      "reason": "example",
      "createdAt": "2026-11-21T10:00:00.000Z"
    }
  ],
  "max": 1
}
```

Καταστάσεις σφάλματος: `401`, `403`, `429`.

### DELETE /avoided-machines/{id}

Διακοπή αποφυγής ενός μηχανήματος

Later launches may be placed on that machine again. 404 `not_found` for an id that is not an entry of your organization.

**Απαιτούμενο scope:** `servers` · **Δικαίωμα:** `servers.manage`

**Παράμετροι**

| Όνομα | Σε | Τύπος | Υποχρεωτικό | Περιγραφή |
| --- | --- | --- | --- | --- |
| `id` | path | string | ναι |  |

**Παράδειγμα αιτήματος (curl)**

```bash
curl -X DELETE "https://apidly.com/api/v1/avoided-machines/avoidedmachine_example" \
  -H "Authorization: Bearer $APIDLY_API_KEY"
```

**JavaScript (SDK)**

```js
await apidly.servers.unavoidMachine("example");
```

**Python (SDK)**

```python
client.servers.unavoid_machine(entry_id="example")
```

**Εργαλείο γραμμής εντολών:** `apidly avoided-machines` ([Αναφορά CLI](/docs/cli))

**Παράδειγμα απάντησης** (200)

```json
{
  "deleted": false,
  "avoided": {
    "id": "example",
    "serverId": "id_example",
    "serverLabel": "example",
    "reason": "example",
    "createdAt": "2026-11-21T10:00:00.000Z"
  }
}
```

Καταστάσεις σφάλματος: `401`, `403`, `404`, `429`.

### GET /servers/{id}

Ένας διακομιστής

A deleted server is kept: it answers 200 with `status: destroyed` and `destroyedAt` set (forever; servers are never removed from the API). 404 `not_found` only for an id that never was a server of your organization. `requested` lists what the server was requested with.

**Απαιτούμενο scope:** `read`

**Παράμετροι**

| Όνομα | Σε | Τύπος | Υποχρεωτικό | Περιγραφή |
| --- | --- | --- | --- | --- |
| `id` | path | string | ναι |  |

**Παράδειγμα αιτήματος (curl)**

```bash
curl "https://apidly.com/api/v1/servers/ins_example" \
  -H "Authorization: Bearer $APIDLY_API_KEY"
```

**JavaScript (SDK)**

```js
await apidly.servers.get("ins_example");
```

**Python (SDK)**

```python
client.servers.get("ins_example")
```

**Εργαλείο γραμμής εντολών:** `apidly up`, `apidly run`, `apidly servers`, `apidly ssh`, `apidly scp`, `apidly ssh-config`, `apidly apply` ([Αναφορά CLI](/docs/cli))

**Παράδειγμα απάντησης** (200)

```json
{
  "server": {
    "id": "example",
    "deploymentId": "id_example",
    "planId": "id_example",
    "templateId": "id_example",
    "label": "example",
    "tags": [
      "example"
    ],
    "note": "example",
    "status": "provisioning",
    "pricing": "on_demand",
    "maxHourlyPriceMicros": "1000000",
    "maxHourlyPriceUsd": "1.000000",
    "interruptedAt": "2026-11-21T10:00:00.000Z",
    "statusMessage": "example",
    "statusReason": "example",
    "startError": "gpu_unsupported",
    "startWarning": "gpu_unsupported",
    "startProgress": {
      "stage": "downloading_image",
      "minutes": 1,
      "elapsedMinutes": 1,
      "percent": 1,
      "message": "example"
    },
    "setupState": "finishing",
    "launchAttempt": {
      "n": 1,
      "of": 1
    },
    "availableUntil": "2026-11-21T10:00:00.000Z",
    "gpuModel": "example",
    "gpuCount": 1,
    "hardware": {
      "cpuName": "example",
      "cudaMax": 1,
      "diskBwMBs": 1,
      "diskName": null,
      "driverVersion": "example",
      "gpuMemBwGBs": 1,
      "hosting": "datacenter",
      "netDownMbps": 1,
      "netUpMbps": 1,
      "regionGroup": "na"
    },
    "vramGb": 1,
    "vcpus": 1,
    "ramGb": 1,
    "diskGb": 1,
    "region": "South Korea",
    "regionCode": "KR",
    "continent": "asia",
    "autoExtend": false,
    "keepOnStartError": false,
    "launchMode": "ssh",
    "hourlyPriceMicros": "1000000",
    "hourlyPriceUsd": "1.000000",
    "storageHourlyMicros": "1000000",
    "storageHourlyUsd": "1.000000",
    "reservedUntil": "2026-11-21T10:00:00.000Z",
    "startedAt": "2026-11-21T10:00:00.000Z",
    "stoppedAt": "2026-11-21T10:00:00.000Z",
    "destroyedAt": "2026-11-21T10:00:00.000Z",
    "createdAt": "2026-11-21T10:00:00.000Z",
    "connection": {
      "key": null
    },
    "metrics": {
      "at": "2026-11-21T10:00:00.000Z",
      "cpuUtilPct": 1,
      "ramUsedMb": 1,
      "ramTotalMb": 1,
      "gpuUtilPct": 1,
      "gpuMemUsedMb": 1,
      "gpuMemTotalMb": 1,
      "gpuTempC": 1,
      "diskUsedPct": 1,
      "diskTotalGb": 1
    },
    "requested": {
      "planId": "id_example",
      "templateId": "id_example",
      "diskGb": 1,
      "pricing": "on_demand",
      "fallbackPlanIds": [],
      "constraints": {
        "region": null,
        "hosting": null,
        "reliability": null,
        "minCpuCores": null,
        "minRamGb": null,
        "minDownMbps": null,
        "minUpMbps": null,
        "minCudaMajor": null,
        "directPorts": null
      },
      "allowSelfStop": false,
      "webTerminal": false,
      "sshKeyIds": [],
      "envKeys": [],
      "volumeId": "id_example",
      "volumeMountPath": "example",
      "automation": {
        "maxRuntimeHours": null,
        "idle": null,
        "destroyAt": null,
        "stopAt": null,
        "spendCapCents": null,
        "schedule": null
      }
    }
  }
}
```

Καταστάσεις σφάλματος: `401`, `403`, `404`, `429`.

### PATCH /servers/{id}

Μετονομασία διακομιστή ή επεξεργασία των ετικετών του

Send `label`, `note` (plain text up to 2,000 characters, `null` or an empty string clears it; shown as text, kept with us and never sent to the host; the audit log records only that it changed), `autoExtend`, `keepOnStartError` and/or tags. `keepOnStartError: true` means a fatal error the app prints while starting never closes this server automatically: it is reported in `startWarning` and you decide. `autoExtend: true` moves the server onto a new machine shortly before its host's rental period ends (`availableUntil`): same plan, template, variables and SSH keys; the disk contents are NOT moved, so keep what matters in cloud storage. Not offered for a server with a volume or a reserved term (409 `auto_extend_unavailable`); 404 `feature_unavailable` while the platform has it switched off. Tags: `tags` replaces the list, `addTags` and `removeTags` edit it (remove first, then add). Up to 10 tags of 1 to 32 characters (`a-z`, `0-9`, `-`, `_`, `.`, `:`; the first is a letter or digit). 400 `too_many_tags` when the result would exceed 10. Tags are yours: they are shown in the console, webhooks and the usage export, and never leave Apidly.

**Απαιτούμενο scope:** `servers`

**Παράμετροι**

| Όνομα | Σε | Τύπος | Υποχρεωτικό | Περιγραφή |
| --- | --- | --- | --- | --- |
| `id` | path | string | ναι |  |

**Σώμα αιτήματος**

| Όνομα | Τύπος | Υποχρεωτικό | Περιγραφή |
| --- | --- | --- | --- |
| `autoExtend` | boolean | όχι |  |
| `keepOnStartError` | boolean | όχι |  |
| `label` | string | όχι |  |
| `note` | string ή null | όχι | Free-text note, plain text up to 2,000 characters; `null` or an empty string clears it. Stays with us: never sent to the host. |
| `tags` | πίνακας από string | όχι |  |
| `addTags` | πίνακας από string | όχι |  |
| `removeTags` | πίνακας από string | όχι |  |

**Παράδειγμα αιτήματος (curl)**

```bash
curl -X PATCH "https://apidly.com/api/v1/servers/ins_example" \
  -H "Authorization: Bearer $APIDLY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"autoExtend":false,"keepOnStartError":false,"label":"example"}'
```

**JavaScript (SDK)**

```js
await apidly.servers.rename("ins_example", "example");
await apidly.servers.tag("ins_example", {
  autoExtend: false,
  keepOnStartError: false,
  label: "example"
});
```

**Python (SDK)**

```python
client.servers.rename("ins_example", label="example")
client.servers.tag("ins_example")
```

**Εργαλείο γραμμής εντολών:** `apidly servers`, `apidly apply` ([Αναφορά CLI](/docs/cli))

**Παράδειγμα απάντησης** (200)

```json
{
  "server": {
    "id": "example",
    "deploymentId": "id_example",
    "planId": "id_example",
    "templateId": "id_example",
    "label": "example",
    "tags": [
      "example"
    ],
    "note": "example",
    "status": "provisioning",
    "pricing": "on_demand",
    "maxHourlyPriceMicros": "1000000",
    "maxHourlyPriceUsd": "1.000000",
    "interruptedAt": "2026-11-21T10:00:00.000Z",
    "statusMessage": "example",
    "statusReason": "example",
    "startError": "gpu_unsupported",
    "startWarning": "gpu_unsupported",
    "startProgress": {
      "stage": "downloading_image",
      "minutes": 1,
      "elapsedMinutes": 1,
      "percent": 1,
      "message": "example"
    },
    "setupState": "finishing",
    "launchAttempt": {
      "n": 1,
      "of": 1
    },
    "availableUntil": "2026-11-21T10:00:00.000Z",
    "gpuModel": "example",
    "gpuCount": 1,
    "hardware": {
      "cpuName": "example",
      "cudaMax": 1,
      "diskBwMBs": 1,
      "diskName": null,
      "driverVersion": "example",
      "gpuMemBwGBs": 1,
      "hosting": "datacenter",
      "netDownMbps": 1,
      "netUpMbps": 1,
      "regionGroup": "na"
    },
    "vramGb": 1,
    "vcpus": 1,
    "ramGb": 1,
    "diskGb": 1,
    "region": "South Korea",
    "regionCode": "KR",
    "continent": "asia",
    "autoExtend": false,
    "keepOnStartError": false,
    "launchMode": "ssh",
    "hourlyPriceMicros": "1000000",
    "hourlyPriceUsd": "1.000000",
    "storageHourlyMicros": "1000000",
    "storageHourlyUsd": "1.000000",
    "reservedUntil": "2026-11-21T10:00:00.000Z",
    "startedAt": "2026-11-21T10:00:00.000Z",
    "stoppedAt": "2026-11-21T10:00:00.000Z",
    "destroyedAt": "2026-11-21T10:00:00.000Z",
    "createdAt": "2026-11-21T10:00:00.000Z",
    "connection": {
      "key": null
    },
    "metrics": {
      "at": "2026-11-21T10:00:00.000Z",
      "cpuUtilPct": 1,
      "ramUsedMb": 1,
      "ramTotalMb": 1,
      "gpuUtilPct": 1,
      "gpuMemUsedMb": 1,
      "gpuMemTotalMb": 1,
      "gpuTempC": 1,
      "diskUsedPct": 1,
      "diskTotalGb": 1
    },
    "requested": {
      "planId": "id_example",
      "templateId": "id_example",
      "diskGb": 1,
      "pricing": "on_demand",
      "fallbackPlanIds": [],
      "constraints": {
        "region": null,
        "hosting": null,
        "reliability": null,
        "minCpuCores": null,
        "minRamGb": null,
        "minDownMbps": null,
        "minUpMbps": null,
        "minCudaMajor": null,
        "directPorts": null
      },
      "allowSelfStop": false,
      "webTerminal": false,
      "sshKeyIds": [],
      "envKeys": [],
      "volumeId": "id_example",
      "volumeMountPath": "example",
      "automation": {
        "maxRuntimeHours": null,
        "idle": null,
        "destroyAt": null,
        "stopAt": null,
        "spendCapCents": null,
        "schedule": null
      }
    }
  }
}
```

Καταστάσεις σφάλματος: `400`, `401`, `403`, `404`, `409`, `429`.

### DELETE /servers/{id}

Διαγραφή διακομιστή και του δίσκου του

Answers 200 with the server already in `status: destroyed` (no intermediate state). From then on `GET /servers/{id}` answers 200 with `status: destroyed`, `GET /servers` leaves it out unless `status=destroyed` is asked for, and a second `DELETE` answers 409 `invalid_state`. 409 `transfer_in_progress` while a backup or copy of it is unfinished (`?force=true` goes ahead). An attached volume is kept.

**Απαιτούμενο scope:** `servers` · **Ρόλος δημιουργού:** `admin`

**Παράμετροι**

| Όνομα | Σε | Τύπος | Υποχρεωτικό | Περιγραφή |
| --- | --- | --- | --- | --- |
| `id` | path | string | ναι |  |

**Παράδειγμα αιτήματος (curl)**

```bash
curl -X DELETE "https://apidly.com/api/v1/servers/ins_example" \
  -H "Authorization: Bearer $APIDLY_API_KEY"
```

**JavaScript (SDK)**

```js
await apidly.servers.delete("ins_example");
```

**Python (SDK)**

```python
client.servers.delete("ins_example")
```

**Εργαλείο γραμμής εντολών:** `apidly destroy`, `apidly apply` ([Αναφορά CLI](/docs/cli))

**Παράδειγμα απάντησης** (200)

```json
{
  "server": {
    "id": "example",
    "deploymentId": "id_example",
    "planId": "id_example",
    "templateId": "id_example",
    "label": "example",
    "tags": [
      "example"
    ],
    "note": "example",
    "status": "provisioning",
    "pricing": "on_demand",
    "maxHourlyPriceMicros": "1000000",
    "maxHourlyPriceUsd": "1.000000",
    "interruptedAt": "2026-11-21T10:00:00.000Z",
    "statusMessage": "example",
    "statusReason": "example",
    "startError": "gpu_unsupported",
    "startWarning": "gpu_unsupported",
    "startProgress": {
      "stage": "downloading_image",
      "minutes": 1,
      "elapsedMinutes": 1,
      "percent": 1,
      "message": "example"
    },
    "setupState": "finishing",
    "launchAttempt": {
      "n": 1,
      "of": 1
    },
    "availableUntil": "2026-11-21T10:00:00.000Z",
    "gpuModel": "example",
    "gpuCount": 1,
    "hardware": {
      "cpuName": "example",
      "cudaMax": 1,
      "diskBwMBs": 1,
      "diskName": null,
      "driverVersion": "example",
      "gpuMemBwGBs": 1,
      "hosting": "datacenter",
      "netDownMbps": 1,
      "netUpMbps": 1,
      "regionGroup": "na"
    },
    "vramGb": 1,
    "vcpus": 1,
    "ramGb": 1,
    "diskGb": 1,
    "region": "South Korea",
    "regionCode": "KR",
    "continent": "asia",
    "autoExtend": false,
    "keepOnStartError": false,
    "launchMode": "ssh",
    "hourlyPriceMicros": "1000000",
    "hourlyPriceUsd": "1.000000",
    "storageHourlyMicros": "1000000",
    "storageHourlyUsd": "1.000000",
    "reservedUntil": "2026-11-21T10:00:00.000Z",
    "startedAt": "2026-11-21T10:00:00.000Z",
    "stoppedAt": "2026-11-21T10:00:00.000Z",
    "destroyedAt": "2026-11-21T10:00:00.000Z",
    "createdAt": "2026-11-21T10:00:00.000Z",
    "connection": {
      "key": null
    },
    "metrics": {
      "at": "2026-11-21T10:00:00.000Z",
      "cpuUtilPct": 1,
      "ramUsedMb": 1,
      "ramTotalMb": 1,
      "gpuUtilPct": 1,
      "gpuMemUsedMb": 1,
      "gpuMemTotalMb": 1,
      "gpuTempC": 1,
      "diskUsedPct": 1,
      "diskTotalGb": 1
    },
    "requested": {
      "planId": "id_example",
      "templateId": "id_example",
      "diskGb": 1,
      "pricing": "on_demand",
      "fallbackPlanIds": [],
      "constraints": {
        "region": null,
        "hosting": null,
        "reliability": null,
        "minCpuCores": null,
        "minRamGb": null,
        "minDownMbps": null,
        "minUpMbps": null,
        "minCudaMajor": null,
        "directPorts": null
      },
      "allowSelfStop": false,
      "webTerminal": false,
      "sshKeyIds": [],
      "envKeys": [],
      "volumeId": "id_example",
      "volumeMountPath": "example",
      "automation": {
        "maxRuntimeHours": null,
        "idle": null,
        "destroyAt": null,
        "stopAt": null,
        "spendCapCents": null,
        "schedule": null
      }
    }
  }
}
```

Καταστάσεις σφάλματος: `401`, `403`, `404`, `409`, `429`.

### POST /servers/tags

Προσθήκη ή αφαίρεση ετικετών σε πολλούς διακομιστές

One tag change for up to 100 servers: `addTags` and/or `removeTags` (remove first, then add, as on one server). The call answers 200 even when some servers could not take the change: each entry of `results` is `ok: true` with the server's new `tags`, or `ok: false` with the `error` that server would have answered alone (`not_found` for an id that is not yours, `invalid_state` for a destroyed server, `too_many_tags` past 10, `internal` when something unexpected failed for that server: retry it, and contact support with the request id if it repeats). Duplicate ids count once.

**Απαιτούμενο scope:** `servers` · **Δικαίωμα:** `servers.manage`

**Σώμα αιτήματος**

| Όνομα | Τύπος | Υποχρεωτικό | Περιγραφή |
| --- | --- | --- | --- |
| `serverIds` | πίνακας από string | ναι |  |
| `addTags` | πίνακας από string | όχι |  |
| `removeTags` | πίνακας από string | όχι |  |

**Παράδειγμα αιτήματος (curl)**

```bash
curl -X POST "https://apidly.com/api/v1/servers/tags" \
  -H "Authorization: Bearer $APIDLY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"serverIds":["example"]}'
```

**JavaScript (SDK)**

```js
await apidly.servers.tagMany({
  serverIds: [
    "example"
  ]
});
```

**Python (SDK)**

```python
client.servers.tag_many(server_ids=["example"])
```

**Εργαλείο γραμμής εντολών:** `apidly servers` ([Αναφορά CLI](/docs/cli))

**Παράδειγμα απάντησης** (200)

```json
{
  "results": [
    {
      "id": "example",
      "ok": false,
      "tags": [
        "example"
      ],
      "error": {
        "code": "example",
        "message": "example"
      }
    }
  ],
  "changed": 1,
  "failed": 1
}
```

Καταστάσεις σφάλματος: `400`, `401`, `403`, `429`.

### POST /servers/bulk

Εκκίνηση, διακοπή, επανεκκίνηση ή διαγραφή πολλών διακομιστών

One `action` (`start`, `stop`, `restart` or `destroy`) for up to 100 servers in one call, counted as one write against the key's rate limit. Each server gets the checks of its one-server call, one after the other: the call answers 200 even when some servers could not take the action, and each entry of `results` is `ok: true` with the server's new `status`, or `ok: false` with the `error` that server would have answered alone (`not_found` for an id that is not yours, `invalid_state` when its status does not allow the action, `transfer_in_progress` while a copy or backup on it is unfinished, unless `force: true`, `internal` when something unexpected failed for that server: the others keep their results; check its status before you retry it). The permission is checked once for the whole call: `servers.manage` for start, stop and restart, `servers.destroy` for destroy (403 `forbidden`). A `start` with a key at its spending limit answers 403 `key_limit_reached` before any server is touched. Duplicate ids count once. A destroy cannot be undone. Select by tags instead of ids: `tags` (one or more) picks every server of your organization that is not deleted and carries all of them (for a member whose role covers only their own servers, only those), at most 100 (400 `invalid_request` above that); `matched` lists them. `dryRun: true` with `tags` answers `matched` and touches nothing. A destroy by tags needs `expectCount`, the number of servers you expect to delete: when the tags match another number nothing is touched (409 `confirmation_mismatch`). Send `serverIds` or `tags`, not both.

**Απαιτούμενο scope:** `servers`

**Σώμα αιτήματος**

| Όνομα | Τύπος | Υποχρεωτικό | Περιγραφή |
| --- | --- | --- | --- |
| `action` | `start` \| `stop` \| `restart` \| `destroy` | ναι |  |
| `serverIds` | πίνακας από string | όχι |  |
| `tags` | πίνακας από string | όχι |  |
| `expectCount` | integer | όχι |  |
| `dryRun` | boolean | όχι |  |
| `force` | boolean | όχι |  |

**Παράδειγμα αιτήματος (curl)**

```bash
curl -X POST "https://apidly.com/api/v1/servers/bulk" \
  -H "Authorization: Bearer $APIDLY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"action":"start"}'
```

**JavaScript (SDK)**

```js
await apidly.servers.bulkAction({
  action: "start"
});
```

**Python (SDK)**

```python
client.servers.bulk_action(action="start")
```

**Εργαλείο γραμμής εντολών:** `apidly servers` ([Αναφορά CLI](/docs/cli))

**Παράδειγμα απάντησης** (200)

```json
{
  "action": "start",
  "results": [
    {
      "id": "example",
      "ok": false,
      "status": "example",
      "error": {
        "code": "example",
        "message": "example"
      }
    }
  ],
  "changed": 1,
  "failed": 1,
  "matched": [
    {
      "id": "example",
      "label": "example",
      "status": "example"
    }
  ],
  "dryRun": false
}
```

Καταστάσεις σφάλματος: `400`, `401`, `403`, `404`, `409`, `429`.

### POST /servers/{id}/{action}

Εκκίνηση, διακοπή ή επανεκκίνηση διακομιστή

409 `rental_ended` when the rental period of the server's machine has ended: it cannot start again, deploy a new server instead (older API versions sent this as `contract_expired`, which the SDKs and the CLI read as `rental_ended`). 409 `invalid_state` when the server cannot take the action in its current state.

**Απαιτούμενο scope:** `servers`

**Παράμετροι**

| Όνομα | Σε | Τύπος | Υποχρεωτικό | Περιγραφή |
| --- | --- | --- | --- | --- |
| `id` | path | string | ναι |  |
| `action` | path | `start` \| `stop` \| `restart` | ναι |  |

**Παράδειγμα αιτήματος (curl)**

```bash
curl -X POST "https://apidly.com/api/v1/servers/ins_example/start" \
  -H "Authorization: Bearer $APIDLY_API_KEY"
```

**Python (SDK)**

```python
client.servers.start("ins_example")
client.servers.stop("ins_example")
client.servers.restart("ins_example")
```

**Εργαλείο γραμμής εντολών:** `apidly start`, `apidly stop`, `apidly restart`, `apidly reboot` ([Αναφορά CLI](/docs/cli))

**Παράδειγμα απάντησης** (200)

```json
{
  "server": {
    "id": "example",
    "deploymentId": "id_example",
    "planId": "id_example",
    "templateId": "id_example",
    "label": "example",
    "tags": [
      "example"
    ],
    "note": "example",
    "status": "provisioning",
    "pricing": "on_demand",
    "maxHourlyPriceMicros": "1000000",
    "maxHourlyPriceUsd": "1.000000",
    "interruptedAt": "2026-11-21T10:00:00.000Z",
    "statusMessage": "example",
    "statusReason": "example",
    "startError": "gpu_unsupported",
    "startWarning": "gpu_unsupported",
    "startProgress": {
      "stage": "downloading_image",
      "minutes": 1,
      "elapsedMinutes": 1,
      "percent": 1,
      "message": "example"
    },
    "setupState": "finishing",
    "launchAttempt": {
      "n": 1,
      "of": 1
    },
    "availableUntil": "2026-11-21T10:00:00.000Z",
    "gpuModel": "example",
    "gpuCount": 1,
    "hardware": {
      "cpuName": "example",
      "cudaMax": 1,
      "diskBwMBs": 1,
      "diskName": null,
      "driverVersion": "example",
      "gpuMemBwGBs": 1,
      "hosting": "datacenter",
      "netDownMbps": 1,
      "netUpMbps": 1,
      "regionGroup": "na"
    },
    "vramGb": 1,
    "vcpus": 1,
    "ramGb": 1,
    "diskGb": 1,
    "region": "South Korea",
    "regionCode": "KR",
    "continent": "asia",
    "autoExtend": false,
    "keepOnStartError": false,
    "launchMode": "ssh",
    "hourlyPriceMicros": "1000000",
    "hourlyPriceUsd": "1.000000",
    "storageHourlyMicros": "1000000",
    "storageHourlyUsd": "1.000000",
    "reservedUntil": "2026-11-21T10:00:00.000Z",
    "startedAt": "2026-11-21T10:00:00.000Z",
    "stoppedAt": "2026-11-21T10:00:00.000Z",
    "destroyedAt": "2026-11-21T10:00:00.000Z",
    "createdAt": "2026-11-21T10:00:00.000Z",
    "connection": {
      "key": null
    },
    "metrics": {
      "at": "2026-11-21T10:00:00.000Z",
      "cpuUtilPct": 1,
      "ramUsedMb": 1,
      "ramTotalMb": 1,
      "gpuUtilPct": 1,
      "gpuMemUsedMb": 1,
      "gpuMemTotalMb": 1,
      "gpuTempC": 1,
      "diskUsedPct": 1,
      "diskTotalGb": 1
    },
    "requested": {
      "planId": "id_example",
      "templateId": "id_example",
      "diskGb": 1,
      "pricing": "on_demand",
      "fallbackPlanIds": [],
      "constraints": {
        "region": null,
        "hosting": null,
        "reliability": null,
        "minCpuCores": null,
        "minRamGb": null,
        "minDownMbps": null,
        "minUpMbps": null,
        "minCudaMajor": null,
        "directPorts": null
      },
      "allowSelfStop": false,
      "webTerminal": false,
      "sshKeyIds": [],
      "envKeys": [],
      "volumeId": "id_example",
      "volumeMountPath": "example",
      "automation": {
        "maxRuntimeHours": null,
        "idle": null,
        "destroyAt": null,
        "stopAt": null,
        "spendCapCents": null,
        "schedule": null
      }
    }
  }
}
```

Καταστάσεις σφάλματος: `400`, `401`, `402`, `403`, `404`, `409`, `429`, `503`.

### GET /servers/{id}/logs

Πρόσφατες γραμμές καταγραφής

The host returns the last lines of the server's output, with no time of its own per line and no paging. `since` / `until` keep only lines that START with an ISO 8601 date-time naming its zone (`2026-11-24T10:00:00Z`, `2026-11-24 10:00:00,123+02:00`, optionally in brackets); a line without a time that follows a timed one belongs to it; lines before the first timed line have no known time, are left out and counted in `timeFilter.untimedLines`. A time window reads the last 1000 lines and returns at most `tail` of the newest matching ones; `timeFilter.mayBeIncomplete` is true when older lines of the window may exist beyond what the host returned. `cursor` names the last lines of this answer: pass it back as `after` to get only the lines written since (all of them up to the 1000 read, `tail` does not cut them); `gap: true` when the lines the cursor named were no longer in the log (more than 1000 lines in between, or the container restarted), and the whole read is returned.

**Απαιτούμενο scope:** `read`

**Παράμετροι**

| Όνομα | Σε | Τύπος | Υποχρεωτικό | Περιγραφή |
| --- | --- | --- | --- | --- |
| `id` | path | string | ναι |  |
| `tail` | query | integer | όχι |  |
| `since` | query | string | όχι |  |
| `until` | query | string | όχι |  |
| `after` | query | string | όχι |  |

**Παράδειγμα αιτήματος (curl)**

```bash
curl "https://apidly.com/api/v1/servers/ins_example/logs" \
  -H "Authorization: Bearer $APIDLY_API_KEY"
```

**JavaScript (SDK)**

```js
await apidly.servers.logs("ins_example");
```

**Python (SDK)**

```python
client.servers.logs("ins_example")
```

**Εργαλείο γραμμής εντολών:** `apidly logs` ([Αναφορά CLI](/docs/cli))

**Παράδειγμα απάντησης** (200)

```json
{
  "logs": "example",
  "cursor": "example",
  "gap": false,
  "timeFilter": {
    "since": "2026-11-21T10:00:00.000Z",
    "until": "2026-11-21T10:00:00.000Z",
    "matchedLines": 1,
    "untimedLines": 1,
    "mayBeIncomplete": false
  }
}
```

Καταστάσεις σφάλματος: `400`, `401`, `403`, `404`, `429`.

### POST /servers/{id}/exec

Εκτέλεση μίας εντολής σε διακομιστή που έχει σταματήσει

Runs a single command through the platform's constrained command runner (not an interactive shell; use SSH for that). The runner works only while the server is stopped (409 `exec_needs_stopped` on a running one) and only for `ls`, `du` and `rm` (400 `command_refused`). Waits up to 40 seconds for the output (`timedOut`); a call that is still running at 45 seconds ends with 504 `exec_timeout`. `output` is scrubbed and capped at 64 KB (`truncated`); `timedOut: true` means no result arrived in time and the command may still be running. The creator of the key must be an owner, an admin or the member who launched the server. 20 commands per minute per user. The audit log keeps the first 200 characters of the command, never the output.

**Απαιτούμενο scope:** `servers`

**Παράμετροι**

| Όνομα | Σε | Τύπος | Υποχρεωτικό | Περιγραφή |
| --- | --- | --- | --- | --- |
| `id` | path | string | ναι |  |

**Σώμα αιτήματος**

| Όνομα | Τύπος | Υποχρεωτικό | Περιγραφή |
| --- | --- | --- | --- |
| `command` | string | ναι |  |

**Παράδειγμα αιτήματος (curl)**

```bash
curl -X POST "https://apidly.com/api/v1/servers/ins_example/exec" \
  -H "Authorization: Bearer $APIDLY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"command":"example"}'
```

**JavaScript (SDK)**

```js
await apidly.servers.exec("ins_example", "example");
```

**Python (SDK)**

```python
client.servers.exec("ins_example", command="example")
```

**Εργαλείο γραμμής εντολών:** `apidly exec` ([Αναφορά CLI](/docs/cli))

**Παράδειγμα απάντησης** (200)

```json
{
  "output": "example",
  "truncated": false,
  "timedOut": false
}
```

Καταστάσεις σφάλματος: `400`, `401`, `403`, `404`, `409`, `429`, `502`, `504`.

### POST /servers/{id}/terminal

Διεύθυνση και κωδικός του τερματικού προγράμματος περιήγησης του διακομιστή

For a running server that was requested with `webTerminal: true` while the platform offers the option (404 `feature_unavailable` otherwise, 404 `terminal_not_enabled` for a server launched without it, 409 `terminal_port_unmapped` while its port is not reachable yet). Returns the page address, the basic-auth user name and the per-server password: this is the only place the password is shown. The page is served by the host itself over HTTPS with a certificate the host made at boot, so a browser warns about it; the address is an IP and port, with no credential inside. `reachable` says whether the terminal answered a check just now (`false` while it is still starting, or when it could not start: the server itself is unaffected and SSH works). The creator of the key must be an owner, an admin or the member who launched the server. Every call is audited without the password.

**Απαιτούμενο scope:** `servers`

**Παράμετροι**

| Όνομα | Σε | Τύπος | Υποχρεωτικό | Περιγραφή |
| --- | --- | --- | --- | --- |
| `id` | path | string | ναι |  |

**Παράδειγμα αιτήματος (curl)**

```bash
curl -X POST "https://apidly.com/api/v1/servers/ins_example/terminal" \
  -H "Authorization: Bearer $APIDLY_API_KEY"
```

**JavaScript (SDK)**

```js
await apidly.servers.terminal("ins_example");
```

**Python (SDK)**

```python
client.servers.terminal("ins_example")
```

**Εργαλείο γραμμής εντολών:** `apidly terminal` ([Αναφορά CLI](/docs/cli))

**Παράδειγμα απάντησης** (200)

```json
{
  "terminal": {
    "url": "https://example.com/hook",
    "host": "example",
    "port": 1,
    "username": "example",
    "password": "example",
    "secure": false,
    "selfSigned": false,
    "reachable": false
  }
}
```

Καταστάσεις σφάλματος: `401`, `403`, `404`, `409`, `429`.

### GET /servers/{id}/events

Συμβάντα κύκλου ζωής ενός διακομιστή, τα νεότερα πρώτα

**Απαιτούμενο scope:** `read`

**Παράμετροι**

| Όνομα | Σε | Τύπος | Υποχρεωτικό | Περιγραφή |
| --- | --- | --- | --- | --- |
| `id` | path | string | ναι |  |
| `limit` | query | integer | όχι |  |
| `cursor` | query | string | όχι |  |

**Παράδειγμα αιτήματος (curl)**

```bash
curl "https://apidly.com/api/v1/servers/ins_example/events?limit=20" \
  -H "Authorization: Bearer $APIDLY_API_KEY"
```

**JavaScript (SDK)**

```js
await apidly.servers.listEvents("ins_example", { limit: 20 });
```

**Python (SDK)**

```python
client.servers.list_events("ins_example")
```

**Εργαλείο γραμμής εντολών:** `apidly servers` ([Αναφορά CLI](/docs/cli))

**Παράδειγμα απάντησης** (200)

```json
{
  "events": [
    {
      "id": "example",
      "type": "example",
      "message": "example",
      "code": "example",
      "params": {
        "key": "example"
      },
      "reason": "example",
      "keyName": "example",
      "actorType": "user",
      "createdAt": "2026-11-21T10:00:00.000Z"
    }
  ],
  "nextCursor": "example"
}
```

Καταστάσεις σφάλματος: `401`, `403`, `404`, `429`.

### GET /servers/{id}/automation

Κανόνες αυτοματισμού ενός διακομιστή

**Απαιτούμενο scope:** `read` · **Δικαίωμα:** `servers.view`

**Παράμετροι**

| Όνομα | Σε | Τύπος | Υποχρεωτικό | Περιγραφή |
| --- | --- | --- | --- | --- |
| `id` | path | string | ναι |  |

**Παράδειγμα αιτήματος (curl)**

```bash
curl "https://apidly.com/api/v1/servers/ins_example/automation" \
  -H "Authorization: Bearer $APIDLY_API_KEY"
```

**JavaScript (SDK)**

```js
await apidly.servers.getAutomation("ins_example");
```

**Python (SDK)**

```python
client.servers.get_automation("ins_example")
```

**Εργαλείο γραμμής εντολών:** `apidly status`, `apidly automation`, `apidly export`, `apidly plan`, `apidly apply` ([Αναφορά CLI](/docs/cli))

**Παράδειγμα απάντησης** (200)

```json
{
  "rules": {
    "maxRuntimeHours": 1,
    "idle": {
      "thresholdPct": 1,
      "minutes": 1
    },
    "destroyAt": "2026-11-21T10:00:00.000Z",
    "stopAt": "2026-11-21T10:00:00.000Z",
    "spendCapCents": 1,
    "schedule": {
      "key": null
    },
    "lastFired": {
      "kind": "example",
      "at": "2026-11-21T10:00:00.000Z"
    }
  },
  "nextStopAt": "2026-11-21T10:00:00.000Z",
  "nextStartAt": "2026-11-21T10:00:00.000Z"
}
```

Καταστάσεις σφάλματος: `401`, `403`, `404`, `429`.

### PUT /servers/{id}/automation

Ορισμός ή εκκαθάριση κανόνων αυτοματισμού

A key present is changed, `null` clears it, an absent key is left alone. `maxRuntimeHours` stops the server after that many hours of running, `stopAt` (ISO time) stops it at a set time and keeps the disk, `idle` stops it when GPU use stays under a threshold. Setting a scheduled destroy needs the destroy permission.

**Απαιτούμενο scope:** `servers` · **Δικαίωμα:** `automation.manage`

**Παράμετροι**

| Όνομα | Σε | Τύπος | Υποχρεωτικό | Περιγραφή |
| --- | --- | --- | --- | --- |
| `id` | path | string | ναι |  |

**Σώμα αιτήματος**

| Όνομα | Τύπος | Υποχρεωτικό | Περιγραφή |
| --- | --- | --- | --- |
| `maxRuntimeHours` | number ή null | όχι |  |
| `idle` | object ή null | όχι |  |
| `destroyAt` | string ή null | όχι |  |
| `stopAt` | string ή null | όχι |  |
| `spendCapCents` | integer ή null | όχι |  |
| `schedule` | object ή null | όχι |  |

**Παράδειγμα αιτήματος (curl)**

```bash
curl -X PUT "https://apidly.com/api/v1/servers/ins_example/automation" \
  -H "Authorization: Bearer $APIDLY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"maxRuntimeHours":0.25,"idle":{"thresholdPct":1,"minutes":10},"destroyAt":"2026-11-21T10:00:00.000Z"}'
```

**JavaScript (SDK)**

```js
await apidly.servers.setAutomation("ins_example", {
  maxRuntimeHours: 0.25,
  idle: {
    thresholdPct: 1,
    minutes: 10
  },
  destroyAt: "2026-11-21T10:00:00.000Z"
});
```

**Python (SDK)**

```python
client.servers.set_automation("ins_example", rules="example")
```

**Εργαλείο γραμμής εντολών:** `apidly up`, `apidly run`, `apidly automation`, `apidly apply` ([Αναφορά CLI](/docs/cli))

**Παράδειγμα απάντησης** (200)

```json
{
  "rules": {
    "maxRuntimeHours": 1,
    "idle": {
      "thresholdPct": 1,
      "minutes": 1
    },
    "destroyAt": "2026-11-21T10:00:00.000Z",
    "stopAt": "2026-11-21T10:00:00.000Z",
    "spendCapCents": 1,
    "schedule": {
      "key": null
    },
    "lastFired": {
      "kind": "example",
      "at": "2026-11-21T10:00:00.000Z"
    }
  },
  "nextStopAt": "2026-11-21T10:00:00.000Z",
  "nextStartAt": "2026-11-21T10:00:00.000Z"
}
```

Καταστάσεις σφάλματος: `400`, `401`, `403`, `404`, `429`.

### DELETE /servers/{id}/automation

Εκκαθάριση όλων των κανόνων αυτοματισμού ενός διακομιστή

**Απαιτούμενο scope:** `servers` · **Δικαίωμα:** `automation.manage`

**Παράμετροι**

| Όνομα | Σε | Τύπος | Υποχρεωτικό | Περιγραφή |
| --- | --- | --- | --- | --- |
| `id` | path | string | ναι |  |

**Παράδειγμα αιτήματος (curl)**

```bash
curl -X DELETE "https://apidly.com/api/v1/servers/ins_example/automation" \
  -H "Authorization: Bearer $APIDLY_API_KEY"
```

**JavaScript (SDK)**

```js
await apidly.servers.clearAutomation("ins_example");
```

**Python (SDK)**

```python
client.servers.clear_automation("ins_example")
```

**Εργαλείο γραμμής εντολών:** `apidly automation` ([Αναφορά CLI](/docs/cli))

**Παράδειγμα απάντησης** (200)

```json
{
  "rules": {
    "maxRuntimeHours": 1,
    "idle": {
      "thresholdPct": 1,
      "minutes": 1
    },
    "destroyAt": "2026-11-21T10:00:00.000Z",
    "stopAt": "2026-11-21T10:00:00.000Z",
    "spendCapCents": 1,
    "schedule": {
      "key": null
    },
    "lastFired": {
      "kind": "example",
      "at": "2026-11-21T10:00:00.000Z"
    }
  },
  "nextStopAt": "2026-11-21T10:00:00.000Z",
  "nextStartAt": "2026-11-21T10:00:00.000Z"
}
```

Καταστάσεις σφάλματος: `401`, `403`, `404`, `429`.

### POST /servers/{id}/recreate

Επαναδημιουργία του κοντέινερ από μια πρόσφατα ληφθείσα εικόνα

Same configuration, new container. DESTRUCTIVE: every file on the server is erased, `/workspace` included; attached volumes and cloud copies are not affected, and the SSH and app ports change (read them again with `GET /servers/{id}`). The key's creator must be an owner, an admin or the member who launched the server.

**Απαιτούμενο scope:** `servers` · **Δικαίωμα:** `servers.manage`

**Παράμετροι**

| Όνομα | Σε | Τύπος | Υποχρεωτικό | Περιγραφή |
| --- | --- | --- | --- | --- |
| `id` | path | string | ναι |  |

**Παράδειγμα αιτήματος (curl)**

```bash
curl -X POST "https://apidly.com/api/v1/servers/ins_example/recreate" \
  -H "Authorization: Bearer $APIDLY_API_KEY"
```

**JavaScript (SDK)**

```js
await apidly.servers.recreate("ins_example");
```

**Python (SDK)**

```python
client.servers.recreate("ins_example")
```

**Εργαλείο γραμμής εντολών:** `apidly recreate` ([Αναφορά CLI](/docs/cli))

**Παράδειγμα απάντησης** (200)

```json
{
  "server": {
    "id": "example",
    "deploymentId": "id_example",
    "planId": "id_example",
    "templateId": "id_example",
    "label": "example",
    "tags": [
      "example"
    ],
    "note": "example",
    "status": "provisioning",
    "pricing": "on_demand",
    "maxHourlyPriceMicros": "1000000",
    "maxHourlyPriceUsd": "1.000000",
    "interruptedAt": "2026-11-21T10:00:00.000Z",
    "statusMessage": "example",
    "statusReason": "example",
    "startError": "gpu_unsupported",
    "startWarning": "gpu_unsupported",
    "startProgress": {
      "stage": "downloading_image",
      "minutes": 1,
      "elapsedMinutes": 1,
      "percent": 1,
      "message": "example"
    },
    "setupState": "finishing",
    "launchAttempt": {
      "n": 1,
      "of": 1
    },
    "availableUntil": "2026-11-21T10:00:00.000Z",
    "gpuModel": "example",
    "gpuCount": 1,
    "hardware": {
      "cpuName": "example",
      "cudaMax": 1,
      "diskBwMBs": 1,
      "diskName": null,
      "driverVersion": "example",
      "gpuMemBwGBs": 1,
      "hosting": "datacenter",
      "netDownMbps": 1,
      "netUpMbps": 1,
      "regionGroup": "na"
    },
    "vramGb": 1,
    "vcpus": 1,
    "ramGb": 1,
    "diskGb": 1,
    "region": "South Korea",
    "regionCode": "KR",
    "continent": "asia",
    "autoExtend": false,
    "keepOnStartError": false,
    "launchMode": "ssh",
    "hourlyPriceMicros": "1000000",
    "hourlyPriceUsd": "1.000000",
    "storageHourlyMicros": "1000000",
    "storageHourlyUsd": "1.000000",
    "reservedUntil": "2026-11-21T10:00:00.000Z",
    "startedAt": "2026-11-21T10:00:00.000Z",
    "stoppedAt": "2026-11-21T10:00:00.000Z",
    "destroyedAt": "2026-11-21T10:00:00.000Z",
    "createdAt": "2026-11-21T10:00:00.000Z",
    "connection": {
      "key": null
    },
    "metrics": {
      "at": "2026-11-21T10:00:00.000Z",
      "cpuUtilPct": 1,
      "ramUsedMb": 1,
      "ramTotalMb": 1,
      "gpuUtilPct": 1,
      "gpuMemUsedMb": 1,
      "gpuMemTotalMb": 1,
      "gpuTempC": 1,
      "diskUsedPct": 1,
      "diskTotalGb": 1
    },
    "requested": {
      "planId": "id_example",
      "templateId": "id_example",
      "diskGb": 1,
      "pricing": "on_demand",
      "fallbackPlanIds": [],
      "constraints": {
        "region": null,
        "hosting": null,
        "reliability": null,
        "minCpuCores": null,
        "minRamGb": null,
        "minDownMbps": null,
        "minUpMbps": null,
        "minCudaMajor": null,
        "directPorts": null
      },
      "allowSelfStop": false,
      "webTerminal": false,
      "sshKeyIds": [],
      "envKeys": [],
      "volumeId": "id_example",
      "volumeMountPath": "example",
      "automation": {
        "maxRuntimeHours": null,
        "idle": null,
        "destroyAt": null,
        "stopAt": null,
        "spendCapCents": null,
        "schedule": null
      }
    }
  }
}
```

Καταστάσεις σφάλματος: `401`, `403`, `404`, `409`, `429`.

### POST /servers/{id}/recycle

Παρωχημένο: χρησιμοποιήστε POST /servers/{id}/recreate

Deprecated name of `POST /servers/{id}/recreate`: the same operation, scope, permission and answer. It keeps working for existing clients; new code calls `POST /servers/{id}/recreate`.

**Απαιτούμενο scope:** `servers` · **Δικαίωμα:** `servers.manage`

**Παράμετροι**

| Όνομα | Σε | Τύπος | Υποχρεωτικό | Περιγραφή |
| --- | --- | --- | --- | --- |
| `id` | path | string | ναι |  |

**Παράδειγμα αιτήματος (curl)**

```bash
curl -X POST "https://apidly.com/api/v1/servers/ins_example/recycle" \
  -H "Authorization: Bearer $APIDLY_API_KEY"
```

**JavaScript (SDK)**

```js
await apidly.servers.recycle("ins_example");
```

**Python (SDK)**

```python
client.servers.recycle("ins_example")
```

**Εργαλείο γραμμής εντολών:** `apidly recycle` ([Αναφορά CLI](/docs/cli))

**Παράδειγμα απάντησης** (200)

```json
{
  "server": {
    "id": "example",
    "deploymentId": "id_example",
    "planId": "id_example",
    "templateId": "id_example",
    "label": "example",
    "tags": [
      "example"
    ],
    "note": "example",
    "status": "provisioning",
    "pricing": "on_demand",
    "maxHourlyPriceMicros": "1000000",
    "maxHourlyPriceUsd": "1.000000",
    "interruptedAt": "2026-11-21T10:00:00.000Z",
    "statusMessage": "example",
    "statusReason": "example",
    "startError": "gpu_unsupported",
    "startWarning": "gpu_unsupported",
    "startProgress": {
      "stage": "downloading_image",
      "minutes": 1,
      "elapsedMinutes": 1,
      "percent": 1,
      "message": "example"
    },
    "setupState": "finishing",
    "launchAttempt": {
      "n": 1,
      "of": 1
    },
    "availableUntil": "2026-11-21T10:00:00.000Z",
    "gpuModel": "example",
    "gpuCount": 1,
    "hardware": {
      "cpuName": "example",
      "cudaMax": 1,
      "diskBwMBs": 1,
      "diskName": null,
      "driverVersion": "example",
      "gpuMemBwGBs": 1,
      "hosting": "datacenter",
      "netDownMbps": 1,
      "netUpMbps": 1,
      "regionGroup": "na"
    },
    "vramGb": 1,
    "vcpus": 1,
    "ramGb": 1,
    "diskGb": 1,
    "region": "South Korea",
    "regionCode": "KR",
    "continent": "asia",
    "autoExtend": false,
    "keepOnStartError": false,
    "launchMode": "ssh",
    "hourlyPriceMicros": "1000000",
    "hourlyPriceUsd": "1.000000",
    "storageHourlyMicros": "1000000",
    "storageHourlyUsd": "1.000000",
    "reservedUntil": "2026-11-21T10:00:00.000Z",
    "startedAt": "2026-11-21T10:00:00.000Z",
    "stoppedAt": "2026-11-21T10:00:00.000Z",
    "destroyedAt": "2026-11-21T10:00:00.000Z",
    "createdAt": "2026-11-21T10:00:00.000Z",
    "connection": {
      "key": null
    },
    "metrics": {
      "at": "2026-11-21T10:00:00.000Z",
      "cpuUtilPct": 1,
      "ramUsedMb": 1,
      "ramTotalMb": 1,
      "gpuUtilPct": 1,
      "gpuMemUsedMb": 1,
      "gpuMemTotalMb": 1,
      "gpuTempC": 1,
      "diskUsedPct": 1,
      "diskTotalGb": 1
    },
    "requested": {
      "planId": "id_example",
      "templateId": "id_example",
      "diskGb": 1,
      "pricing": "on_demand",
      "fallbackPlanIds": [],
      "constraints": {
        "region": null,
        "hosting": null,
        "reliability": null,
        "minCpuCores": null,
        "minRamGb": null,
        "minDownMbps": null,
        "minUpMbps": null,
        "minCudaMajor": null,
        "directPorts": null
      },
      "allowSelfStop": false,
      "webTerminal": false,
      "sshKeyIds": [],
      "envKeys": [],
      "volumeId": "id_example",
      "volumeMountPath": "example",
      "automation": {
        "maxRuntimeHours": null,
        "idle": null,
        "destroyAt": null,
        "stopAt": null,
        "spendCapCents": null,
        "schedule": null
      }
    }
  }
}
```

Καταστάσεις σφάλματος: `401`, `403`, `404`, `409`, `429`.

### GET /servers/{id}/max-price

Διακομιστής με δυνατότητα διακοπής: η μέγιστη τιμή και το ανώτατο όριο στο οποίο μπορεί να αυξηθεί

Both values are null when the server is not interruptible.

**Απαιτούμενο scope:** `read` · **Δικαίωμα:** `servers.view`

**Παράμετροι**

| Όνομα | Σε | Τύπος | Υποχρεωτικό | Περιγραφή |
| --- | --- | --- | --- | --- |
| `id` | path | string | ναι |  |

**Παράδειγμα αιτήματος (curl)**

```bash
curl "https://apidly.com/api/v1/servers/ins_example/max-price" \
  -H "Authorization: Bearer $APIDLY_API_KEY"
```

**JavaScript (SDK)**

```js
await apidly.servers.getMaxPrice("ins_example");
```

**Python (SDK)**

```python
client.servers.get_max_price("ins_example")
```

**Εργαλείο γραμμής εντολών:** `apidly servers` ([Αναφορά CLI](/docs/cli))

**Παράδειγμα απάντησης** (200)

```json
{
  "maxHourlyPriceMicros": "1000000",
  "maxHourlyPriceUsd": "1.000000",
  "limitHourlyPriceMicros": "1000000",
  "limitHourlyPriceUsd": "1.000000"
}
```

Καταστάσεις σφάλματος: `401`, `403`, `404`, `429`.

### POST /servers/{id}/max-price

Αύξηση της μέγιστης τιμής ενός διακομιστή με δυνατότητα διακοπής

The maximum can only go up, and never above the limit from `GET /servers/{id}/max-price`. 409 `invalid_state` for a server that is not interruptible, 400 `above_cap` or `invalid_price` for a value that is refused.

**Απαιτούμενο scope:** `full` · **Δικαίωμα:** `billing.manage`

**Παράμετροι**

| Όνομα | Σε | Τύπος | Υποχρεωτικό | Περιγραφή |
| --- | --- | --- | --- | --- |
| `id` | path | string | ναι |  |

**Σώμα αιτήματος**

| Όνομα | Τύπος | Υποχρεωτικό | Περιγραφή |
| --- | --- | --- | --- |
| `maxHourlyPriceMicros` | string | ναι |  |

**Παράδειγμα αιτήματος (curl)**

```bash
curl -X POST "https://apidly.com/api/v1/servers/ins_example/max-price" \
  -H "Authorization: Bearer $APIDLY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"maxHourlyPriceMicros":"example"}'
```

**JavaScript (SDK)**

```js
await apidly.servers.raiseMaxPrice("ins_example", "example");
```

**Python (SDK)**

```python
client.servers.raise_max_price("ins_example", max_hourly_price_micros="example")
```

**Εργαλείο γραμμής εντολών:** `apidly servers` ([Αναφορά CLI](/docs/cli))

**Παράδειγμα απάντησης** (200)

```json
{
  "server": {
    "id": "example",
    "deploymentId": "id_example",
    "planId": "id_example",
    "templateId": "id_example",
    "label": "example",
    "tags": [
      "example"
    ],
    "note": "example",
    "status": "provisioning",
    "pricing": "on_demand",
    "maxHourlyPriceMicros": "1000000",
    "maxHourlyPriceUsd": "1.000000",
    "interruptedAt": "2026-11-21T10:00:00.000Z",
    "statusMessage": "example",
    "statusReason": "example",
    "startError": "gpu_unsupported",
    "startWarning": "gpu_unsupported",
    "startProgress": {
      "stage": "downloading_image",
      "minutes": 1,
      "elapsedMinutes": 1,
      "percent": 1,
      "message": "example"
    },
    "setupState": "finishing",
    "launchAttempt": {
      "n": 1,
      "of": 1
    },
    "availableUntil": "2026-11-21T10:00:00.000Z",
    "gpuModel": "example",
    "gpuCount": 1,
    "hardware": {
      "cpuName": "example",
      "cudaMax": 1,
      "diskBwMBs": 1,
      "diskName": null,
      "driverVersion": "example",
      "gpuMemBwGBs": 1,
      "hosting": "datacenter",
      "netDownMbps": 1,
      "netUpMbps": 1,
      "regionGroup": "na"
    },
    "vramGb": 1,
    "vcpus": 1,
    "ramGb": 1,
    "diskGb": 1,
    "region": "South Korea",
    "regionCode": "KR",
    "continent": "asia",
    "autoExtend": false,
    "keepOnStartError": false,
    "launchMode": "ssh",
    "hourlyPriceMicros": "1000000",
    "hourlyPriceUsd": "1.000000",
    "storageHourlyMicros": "1000000",
    "storageHourlyUsd": "1.000000",
    "reservedUntil": "2026-11-21T10:00:00.000Z",
    "startedAt": "2026-11-21T10:00:00.000Z",
    "stoppedAt": "2026-11-21T10:00:00.000Z",
    "destroyedAt": "2026-11-21T10:00:00.000Z",
    "createdAt": "2026-11-21T10:00:00.000Z",
    "connection": {
      "key": null
    },
    "metrics": {
      "at": "2026-11-21T10:00:00.000Z",
      "cpuUtilPct": 1,
      "ramUsedMb": 1,
      "ramTotalMb": 1,
      "gpuUtilPct": 1,
      "gpuMemUsedMb": 1,
      "gpuMemTotalMb": 1,
      "gpuTempC": 1,
      "diskUsedPct": 1,
      "diskTotalGb": 1
    },
    "requested": {
      "planId": "id_example",
      "templateId": "id_example",
      "diskGb": 1,
      "pricing": "on_demand",
      "fallbackPlanIds": [],
      "constraints": {
        "region": null,
        "hosting": null,
        "reliability": null,
        "minCpuCores": null,
        "minRamGb": null,
        "minDownMbps": null,
        "minUpMbps": null,
        "minCudaMajor": null,
        "directPorts": null
      },
      "allowSelfStop": false,
      "webTerminal": false,
      "sshKeyIds": [],
      "envKeys": [],
      "volumeId": "id_example",
      "volumeMountPath": "example",
      "automation": {
        "maxRuntimeHours": null,
        "idle": null,
        "destroyAt": null,
        "stopAt": null,
        "spendCapCents": null,
        "schedule": null
      }
    }
  }
}
```

Καταστάσεις σφάλματος: `400`, `401`, `403`, `404`, `409`, `429`.

### POST /servers/{id}/hard-reboot

Διακοπή ενός διακομιστή που εκτελείται και νέα εκκίνησή του

Unlike `restart`, the server is stopped first and started again by the next minute job, which gives the container a clean start. Files, `/workspace` included, are kept; the uptime the operating system reports is the host's and does not reset. 409 `invalid_state` unless the server is running.

**Απαιτούμενο scope:** `servers` · **Δικαίωμα:** `servers.manage`

**Παράμετροι**

| Όνομα | Σε | Τύπος | Υποχρεωτικό | Περιγραφή |
| --- | --- | --- | --- | --- |
| `id` | path | string | ναι |  |

**Παράδειγμα αιτήματος (curl)**

```bash
curl -X POST "https://apidly.com/api/v1/servers/ins_example/hard-reboot" \
  -H "Authorization: Bearer $APIDLY_API_KEY"
```

**JavaScript (SDK)**

```js
await apidly.servers.hardReboot("ins_example");
```

**Python (SDK)**

```python
client.servers.hard_reboot("ins_example")
```

**Εργαλείο γραμμής εντολών:** `apidly reboot` ([Αναφορά CLI](/docs/cli))

**Παράδειγμα απάντησης** (200)

```json
{
  "server": {
    "id": "example",
    "deploymentId": "id_example",
    "planId": "id_example",
    "templateId": "id_example",
    "label": "example",
    "tags": [
      "example"
    ],
    "note": "example",
    "status": "provisioning",
    "pricing": "on_demand",
    "maxHourlyPriceMicros": "1000000",
    "maxHourlyPriceUsd": "1.000000",
    "interruptedAt": "2026-11-21T10:00:00.000Z",
    "statusMessage": "example",
    "statusReason": "example",
    "startError": "gpu_unsupported",
    "startWarning": "gpu_unsupported",
    "startProgress": {
      "stage": "downloading_image",
      "minutes": 1,
      "elapsedMinutes": 1,
      "percent": 1,
      "message": "example"
    },
    "setupState": "finishing",
    "launchAttempt": {
      "n": 1,
      "of": 1
    },
    "availableUntil": "2026-11-21T10:00:00.000Z",
    "gpuModel": "example",
    "gpuCount": 1,
    "hardware": {
      "cpuName": "example",
      "cudaMax": 1,
      "diskBwMBs": 1,
      "diskName": null,
      "driverVersion": "example",
      "gpuMemBwGBs": 1,
      "hosting": "datacenter",
      "netDownMbps": 1,
      "netUpMbps": 1,
      "regionGroup": "na"
    },
    "vramGb": 1,
    "vcpus": 1,
    "ramGb": 1,
    "diskGb": 1,
    "region": "South Korea",
    "regionCode": "KR",
    "continent": "asia",
    "autoExtend": false,
    "keepOnStartError": false,
    "launchMode": "ssh",
    "hourlyPriceMicros": "1000000",
    "hourlyPriceUsd": "1.000000",
    "storageHourlyMicros": "1000000",
    "storageHourlyUsd": "1.000000",
    "reservedUntil": "2026-11-21T10:00:00.000Z",
    "startedAt": "2026-11-21T10:00:00.000Z",
    "stoppedAt": "2026-11-21T10:00:00.000Z",
    "destroyedAt": "2026-11-21T10:00:00.000Z",
    "createdAt": "2026-11-21T10:00:00.000Z",
    "connection": {
      "key": null
    },
    "metrics": {
      "at": "2026-11-21T10:00:00.000Z",
      "cpuUtilPct": 1,
      "ramUsedMb": 1,
      "ramTotalMb": 1,
      "gpuUtilPct": 1,
      "gpuMemUsedMb": 1,
      "gpuMemTotalMb": 1,
      "gpuTempC": 1,
      "diskUsedPct": 1,
      "diskTotalGb": 1
    },
    "requested": {
      "planId": "id_example",
      "templateId": "id_example",
      "diskGb": 1,
      "pricing": "on_demand",
      "fallbackPlanIds": [],
      "constraints": {
        "region": null,
        "hosting": null,
        "reliability": null,
        "minCpuCores": null,
        "minRamGb": null,
        "minDownMbps": null,
        "minUpMbps": null,
        "minCudaMajor": null,
        "directPorts": null
      },
      "allowSelfStop": false,
      "webTerminal": false,
      "sshKeyIds": [],
      "envKeys": [],
      "volumeId": "id_example",
      "volumeMountPath": "example",
      "automation": {
        "maxRuntimeHours": null,
        "idle": null,
        "destroyAt": null,
        "stopAt": null,
        "spendCapCents": null,
        "schedule": null
      }
    }
  }
}
```

Καταστάσεις σφάλματος: `401`, `403`, `404`, `409`, `429`.

### GET /servers/{id}/usage

Ωριαίες χρεώσεις ενός διακομιστή

`usage` has one row per hour and kind (compute or storage); `totals` are bigint micros as strings. `from` defaults to the hour the server was created.

**Απαιτούμενο scope:** `read` · **Δικαίωμα:** `servers.view`

**Παράμετροι**

| Όνομα | Σε | Τύπος | Υποχρεωτικό | Περιγραφή |
| --- | --- | --- | --- | --- |
| `id` | path | string | ναι |  |
| `from` | query | οποιοσδήποτε | όχι |  |
| `to` | query | οποιοσδήποτε | όχι |  |

**Παράδειγμα αιτήματος (curl)**

```bash
curl "https://apidly.com/api/v1/servers/ins_example/usage" \
  -H "Authorization: Bearer $APIDLY_API_KEY"
```

**JavaScript (SDK)**

```js
await apidly.servers.usage("ins_example");
```

**Python (SDK)**

```python
client.servers.usage("ins_example")
```

**Εργαλείο γραμμής εντολών:** `apidly servers` ([Αναφορά CLI](/docs/cli))

**Παράδειγμα απάντησης** (200)

```json
{
  "usage": [
    {
      "kind": "compute",
      "periodStart": "2026-11-21T10:00:00.000Z",
      "periodEnd": "2026-11-21T10:00:00.000Z",
      "seconds": 1,
      "priceMicros": "1000000",
      "priceUsd": "1.000000"
    }
  ],
  "totals": {
    "computeMicros": "1000000",
    "computeUsd": "1.000000",
    "storageMicros": "1000000",
    "storageUsd": "1.000000",
    "totalMicros": "1000000",
    "totalUsd": "1.000000"
  }
}
```

Καταστάσεις σφάλματος: `400`, `401`, `403`, `404`, `429`.

### GET /servers/{id}/ssh-keys

Αποθηκευμένα κλειδιά SSH, με ένδειξη αν το καθένα υπάρχει σε αυτόν τον διακομιστή

**Απαιτούμενο scope:** `read` · **Δικαίωμα:** `servers.view`

**Παράμετροι**

| Όνομα | Σε | Τύπος | Υποχρεωτικό | Περιγραφή |
| --- | --- | --- | --- | --- |
| `id` | path | string | ναι |  |

**Παράδειγμα αιτήματος (curl)**

```bash
curl "https://apidly.com/api/v1/servers/ins_example/ssh-keys" \
  -H "Authorization: Bearer $APIDLY_API_KEY"
```

**JavaScript (SDK)**

```js
await apidly.servers.listSshKeys("ins_example");
```

**Python (SDK)**

```python
client.servers.list_ssh_keys("ins_example")
```

**Εργαλείο γραμμής εντολών:** `apidly ssh-keys` ([Αναφορά CLI](/docs/cli))

**Παράδειγμα απάντησης** (200)

```json
{
  "keys": [
    {
      "id": "example",
      "name": "example",
      "fingerprint": "example",
      "attached": false
    }
  ],
  "live": false
}
```

Καταστάσεις σφάλματος: `401`, `403`, `404`, `429`.

### POST /servers/{id}/ssh-keys

Σύνδεση αποθηκευμένου κλειδιού SSH σε διακομιστή που εκτελείται

`keyId` is an id from `GET /ssh-keys`. 409 `invalid_state` unless the server is running. Returns the updated list.

**Απαιτούμενο scope:** `full` · **Δικαίωμα:** `ssh_keys.manage`

**Παράμετροι**

| Όνομα | Σε | Τύπος | Υποχρεωτικό | Περιγραφή |
| --- | --- | --- | --- | --- |
| `id` | path | string | ναι |  |

**Σώμα αιτήματος**

| Όνομα | Τύπος | Υποχρεωτικό | Περιγραφή |
| --- | --- | --- | --- |
| `keyId` | string | ναι |  |

**Παράδειγμα αιτήματος (curl)**

```bash
curl -X POST "https://apidly.com/api/v1/servers/ins_example/ssh-keys" \
  -H "Authorization: Bearer $APIDLY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"keyId":"id_example"}'
```

**JavaScript (SDK)**

```js
await apidly.servers.attachSshKey("ins_example", "id_example");
```

**Python (SDK)**

```python
client.servers.attach_ssh_key("ins_example", key_id="id_example")
```

**Εργαλείο γραμμής εντολών:** `apidly ssh-keys` ([Αναφορά CLI](/docs/cli))

**Παράδειγμα απάντησης** (200)

```json
{
  "keys": [
    {
      "id": "example",
      "name": "example",
      "fingerprint": "example",
      "attached": false
    }
  ],
  "live": false
}
```

Καταστάσεις σφάλματος: `400`, `401`, `403`, `404`, `409`, `429`.

### DELETE /servers/{id}/ssh-keys/{keyId}

Αφαίρεση αποθηκευμένου κλειδιού SSH από διακομιστή που εκτελείται

The key stays saved in the organization. Returns the updated list.

**Απαιτούμενο scope:** `full` · **Δικαίωμα:** `ssh_keys.manage`

**Παράμετροι**

| Όνομα | Σε | Τύπος | Υποχρεωτικό | Περιγραφή |
| --- | --- | --- | --- | --- |
| `id` | path | string | ναι |  |
| `keyId` | path | string | ναι |  |

**Παράδειγμα αιτήματος (curl)**

```bash
curl -X DELETE "https://apidly.com/api/v1/servers/ins_example/ssh-keys/ins_example" \
  -H "Authorization: Bearer $APIDLY_API_KEY"
```

**JavaScript (SDK)**

```js
await apidly.servers.detachSshKey("ins_example", "ins_example");
```

**Python (SDK)**

```python
client.servers.detach_ssh_key("ins_example", "ins_example")
```

**Εργαλείο γραμμής εντολών:** `apidly ssh-keys` ([Αναφορά CLI](/docs/cli))

**Παράδειγμα απάντησης** (200)

```json
{
  "keys": [
    {
      "id": "example",
      "name": "example",
      "fingerprint": "example",
      "attached": false
    }
  ],
  "live": false
}
```

Καταστάσεις σφάλματος: `401`, `403`, `404`, `409`, `429`.

### GET /servers/{id}/metrics

Δείγματα χρήσης ενός διακομιστή

One sample per sync (thinned to at most 240), oldest first, plus `current` when the latest reading is under five minutes old. Samples are kept for 48 hours.

**Απαιτούμενο scope:** `read` · **Δικαίωμα:** `servers.view`

**Παράμετροι**

| Όνομα | Σε | Τύπος | Υποχρεωτικό | Περιγραφή |
| --- | --- | --- | --- | --- |
| `id` | path | string | ναι |  |
| `range` | query | `1h` \| `6h` \| `24h` \| `48h` | όχι |  |

**Παράδειγμα αιτήματος (curl)**

```bash
curl "https://apidly.com/api/v1/servers/ins_example/metrics" \
  -H "Authorization: Bearer $APIDLY_API_KEY"
```

**JavaScript (SDK)**

```js
await apidly.servers.metrics("ins_example");
```

**Python (SDK)**

```python
client.servers.metrics("ins_example")
```

**Εργαλείο γραμμής εντολών:** `apidly servers` ([Αναφορά CLI](/docs/cli))

**Παράδειγμα απάντησης** (200)

```json
{
  "samples": [
    {
      "at": "2026-11-21T10:00:00.000Z",
      "cpuUtilPct": 1,
      "ramUsedMb": 1,
      "ramTotalMb": 1,
      "gpuUtilPct": 1,
      "gpuMemUsedMb": 1,
      "gpuMemTotalMb": 1,
      "gpuTempC": 1,
      "diskUsedPct": 1,
      "diskTotalGb": 1
    }
  ],
  "current": {
    "at": "2026-11-21T10:00:00.000Z",
    "cpuUtilPct": 1,
    "ramUsedMb": 1,
    "ramTotalMb": 1,
    "gpuUtilPct": 1,
    "gpuMemUsedMb": 1,
    "gpuMemTotalMb": 1,
    "gpuTempC": 1,
    "diskUsedPct": 1,
    "diskTotalGb": 1
  }
}
```

Καταστάσεις σφάλματος: `400`, `401`, `403`, `404`, `429`.

### GET /servers/{id}/logs/download

Οι τελευταίες 1000 γραμμές καταγραφής ως αρχείο κειμένου

Returns `text/plain` with a `content-disposition` attachment header.

**Απαιτούμενο scope:** `read` · **Δικαίωμα:** `servers.view`

**Παράμετροι**

| Όνομα | Σε | Τύπος | Υποχρεωτικό | Περιγραφή |
| --- | --- | --- | --- | --- |
| `id` | path | string | ναι |  |

**Παράδειγμα αιτήματος (curl)**

```bash
curl "https://apidly.com/api/v1/servers/ins_example/logs/download" \
  -H "Authorization: Bearer $APIDLY_API_KEY"
```

**JavaScript (SDK)**

```js
await apidly.servers.downloadLogs("ins_example");
```

**Python (SDK)**

```python
client.servers.download_logs("ins_example")
```

**Εργαλείο γραμμής εντολών:** `apidly logs` ([Αναφορά CLI](/docs/cli))

**Παράδειγμα απάντησης** (200)

`text/plain`

Καταστάσεις σφάλματος: `401`, `403`, `404`, `429`.

### GET /servers/{id}/automation/calendar

Προγραμματισμένες εκκινήσεις και διακοπές ως αρχείο ημερολογίου

Returns `text/calendar` (iCalendar) for a calendar app: one event per weekly-schedule window in the next `weeks` (default 4, at most 12), plus a scheduled stop or destroy when one is set. Times are in UTC with daylight-saving changes already applied. Rules without a fixed time (idle stop, maximum runtime, spend cap) are not in it. A destroyed server gives an empty calendar.

**Απαιτούμενο scope:** `read` · **Δικαίωμα:** `servers.view`

**Παράμετροι**

| Όνομα | Σε | Τύπος | Υποχρεωτικό | Περιγραφή |
| --- | --- | --- | --- | --- |
| `id` | path | string | ναι |  |
| `weeks` | query | integer | όχι |  |

**Παράδειγμα αιτήματος (curl)**

```bash
curl "https://apidly.com/api/v1/servers/ins_example/automation/calendar" \
  -H "Authorization: Bearer $APIDLY_API_KEY"
```

**JavaScript (SDK)**

```js
await apidly.servers.automationCalendar("ins_example");
```

**Python (SDK)**

```python
client.servers.automation_calendar("ins_example")
```

**Εργαλείο γραμμής εντολών:** `apidly automation` ([Αναφορά CLI](/docs/cli))

**Παράδειγμα απάντησης** (200)

`text/calendar`

Καταστάσεις σφάλματος: `400`, `401`, `403`, `404`, `429`.

### GET /servers/{id}/portal-health

Αν απαντά κάθε θύρα ενός διακομιστή σε λειτουργία

One probe per mapped port, from our side: `reachable` is true when it answers, false when not (yet), null when not probed. 409 `invalid_state` unless the server is running.

**Απαιτούμενο scope:** `read` · **Δικαίωμα:** `servers.view`

**Παράμετροι**

| Όνομα | Σε | Τύπος | Υποχρεωτικό | Περιγραφή |
| --- | --- | --- | --- | --- |
| `id` | path | string | ναι |  |

**Παράδειγμα αιτήματος (curl)**

```bash
curl "https://apidly.com/api/v1/servers/ins_example/portal-health" \
  -H "Authorization: Bearer $APIDLY_API_KEY"
```

**JavaScript (SDK)**

```js
await apidly.servers.portalHealth("ins_example");
```

**Python (SDK)**

```python
client.servers.portal_health("ins_example")
```

**Εργαλείο γραμμής εντολών:** `apidly ports` ([Αναφορά CLI](/docs/cli))

**Παράδειγμα απάντησης** (200)

```json
{
  "ports": [
    {
      "internal": 1,
      "reachable": false
    }
  ],
  "checkedAt": "2026-11-21T10:00:00.000Z"
}
```

Καταστάσεις σφάλματος: `401`, `403`, `404`, `409`, `429`.

## Αιτήματα

### GET /deployments

Αιτήματα διακομιστή, τα νεότερα πρώτα

**Απαιτούμενο scope:** `read`

**Παράμετροι**

| Όνομα | Σε | Τύπος | Υποχρεωτικό | Περιγραφή |
| --- | --- | --- | --- | --- |
| `limit` | query | integer | όχι |  |
| `cursor` | query | string | όχι |  |
| `status` | query | `pending_approval` \| `approved` \| `provisioning` \| `active` \| `rejected` \| `failed` \| `cancelled` | όχι |  |

**Παράδειγμα αιτήματος (curl)**

```bash
curl "https://apidly.com/api/v1/deployments?limit=20" \
  -H "Authorization: Bearer $APIDLY_API_KEY"
```

**JavaScript (SDK)**

```js
await apidly.deployments.list({ limit: 20 });
```

**Python (SDK)**

```python
client.deployments.list()
```

**Εργαλείο γραμμής εντολών:** `apidly status`, `apidly doctor`, `apidly deployments`, `apidly plan`, `apidly apply` ([Αναφορά CLI](/docs/cli))

**Παράδειγμα απάντησης** (200)

```json
{
  "deployments": [
    {
      "id": "example",
      "planId": "id_example",
      "templateId": "id_example",
      "label": "example",
      "tags": [
        "example"
      ],
      "diskGb": 1,
      "sshKeyIds": [
        "example"
      ],
      "envKeys": [
        "example"
      ],
      "status": "pending_approval",
      "reason": "example",
      "startError": "gpu_unsupported",
      "statusMessage": "example",
      "chargedMicros": "1000000",
      "chargedUsd": "1.000000",
      "chargedSeconds": 1,
      "refundedMicros": "1000000",
      "refundedUsd": "1.000000",
      "hourlyPriceMicros": "1000000",
      "hourlyPriceUsd": "1.000000",
      "storageHourlyMicros": "1000000",
      "storageHourlyUsd": "1.000000",
      "pricing": "on_demand",
      "fallbackPlanIds": [
        "example"
      ],
      "alternatives": [
        {
          "planId": null,
          "name": null,
          "hourlyPriceMicros": null,
          "hourlyPriceUsd": null,
          "withinAgreed": null
        }
      ],
      "allowSelfStop": false,
      "instanceId": "id_example",
      "serverId": "id_example",
      "requested": {
        "planId": "id_example",
        "templateId": "id_example",
        "diskGb": 1,
        "pricing": "on_demand",
        "fallbackPlanIds": [],
        "constraints": {
          "region": null,
          "hosting": null,
          "reliability": null,
          "minCpuCores": null,
          "minRamGb": null,
          "minDownMbps": null,
          "minUpMbps": null,
          "minCudaMajor": null,
          "directPorts": null
        },
        "allowSelfStop": false,
        "webTerminal": false,
        "sshKeyIds": [],
        "envKeys": [],
        "volumeId": "id_example",
        "volumeMountPath": "example",
        "automation": {
          "maxRuntimeHours": null,
          "idle": null,
          "destroyAt": null,
          "stopAt": null,
          "spendCapCents": null,
          "schedule": null
        }
      },
      "decidedAt": "2026-11-21T10:00:00.000Z",
      "createdAt": "2026-11-21T10:00:00.000Z"
    }
  ],
  "nextCursor": "example"
}
```

Καταστάσεις σφάλματος: `401`, `403`, `429`.

### GET /deployments/{id}

Ένα αίτημα διακομιστή

**Απαιτούμενο scope:** `read`

**Παράμετροι**

| Όνομα | Σε | Τύπος | Υποχρεωτικό | Περιγραφή |
| --- | --- | --- | --- | --- |
| `id` | path | string | ναι |  |

**Παράδειγμα αιτήματος (curl)**

```bash
curl "https://apidly.com/api/v1/deployments/dep_example" \
  -H "Authorization: Bearer $APIDLY_API_KEY"
```

**JavaScript (SDK)**

```js
await apidly.deployments.get("dep_example");
```

**Python (SDK)**

```python
client.deployments.get("dep_example")
```

**Εργαλείο γραμμής εντολών:** `apidly deployments` ([Αναφορά CLI](/docs/cli))

**Παράδειγμα απάντησης** (200)

```json
{
  "deployment": {
    "id": "example",
    "planId": "id_example",
    "templateId": "id_example",
    "label": "example",
    "tags": [
      "example"
    ],
    "diskGb": 1,
    "sshKeyIds": [
      "example"
    ],
    "envKeys": [
      "example"
    ],
    "status": "pending_approval",
    "reason": "example",
    "startError": "gpu_unsupported",
    "statusMessage": "example",
    "chargedMicros": "1000000",
    "chargedUsd": "1.000000",
    "chargedSeconds": 1,
    "refundedMicros": "1000000",
    "refundedUsd": "1.000000",
    "hourlyPriceMicros": "1000000",
    "hourlyPriceUsd": "1.000000",
    "storageHourlyMicros": "1000000",
    "storageHourlyUsd": "1.000000",
    "pricing": "on_demand",
    "fallbackPlanIds": [
      "example"
    ],
    "alternatives": [
      {
        "planId": "id_example",
        "name": "example",
        "hourlyPriceMicros": "1000000",
        "hourlyPriceUsd": "1.000000",
        "withinAgreed": false
      }
    ],
    "allowSelfStop": false,
    "instanceId": "id_example",
    "serverId": "id_example",
    "requested": {
      "planId": "id_example",
      "templateId": "id_example",
      "diskGb": 1,
      "pricing": "on_demand",
      "fallbackPlanIds": [
        "example"
      ],
      "constraints": {
        "region": "na",
        "hosting": "datacenter",
        "reliability": "high",
        "minCpuCores": 1,
        "minRamGb": 1,
        "minDownMbps": 1,
        "minUpMbps": 1,
        "minCudaMajor": 11,
        "directPorts": false
      },
      "allowSelfStop": false,
      "webTerminal": false,
      "sshKeyIds": [
        "example"
      ],
      "envKeys": [
        "example"
      ],
      "volumeId": "id_example",
      "volumeMountPath": "example",
      "automation": {
        "maxRuntimeHours": null,
        "idle": null,
        "destroyAt": null,
        "stopAt": null,
        "spendCapCents": null,
        "schedule": null
      }
    },
    "decidedAt": "2026-11-21T10:00:00.000Z",
    "createdAt": "2026-11-21T10:00:00.000Z"
  }
}
```

Καταστάσεις σφάλματος: `401`, `403`, `404`, `429`.

### POST /deployments/{id}/cancel

Ακύρωση αιτήματος που περιμένει έγκριση

**Απαιτούμενο scope:** `servers`

**Παράμετροι**

| Όνομα | Σε | Τύπος | Υποχρεωτικό | Περιγραφή |
| --- | --- | --- | --- | --- |
| `id` | path | string | ναι |  |

**Παράδειγμα αιτήματος (curl)**

```bash
curl -X POST "https://apidly.com/api/v1/deployments/dep_example/cancel" \
  -H "Authorization: Bearer $APIDLY_API_KEY"
```

**JavaScript (SDK)**

```js
await apidly.deployments.cancel("dep_example");
```

**Python (SDK)**

```python
client.deployments.cancel("dep_example")
```

**Εργαλείο γραμμής εντολών:** `apidly deployments` ([Αναφορά CLI](/docs/cli))

**Παράδειγμα απάντησης** (200)

```json
{
  "deployment": {
    "id": "example",
    "planId": "id_example",
    "templateId": "id_example",
    "label": "example",
    "tags": [
      "example"
    ],
    "diskGb": 1,
    "sshKeyIds": [
      "example"
    ],
    "envKeys": [
      "example"
    ],
    "status": "pending_approval",
    "reason": "example",
    "startError": "gpu_unsupported",
    "statusMessage": "example",
    "chargedMicros": "1000000",
    "chargedUsd": "1.000000",
    "chargedSeconds": 1,
    "refundedMicros": "1000000",
    "refundedUsd": "1.000000",
    "hourlyPriceMicros": "1000000",
    "hourlyPriceUsd": "1.000000",
    "storageHourlyMicros": "1000000",
    "storageHourlyUsd": "1.000000",
    "pricing": "on_demand",
    "fallbackPlanIds": [
      "example"
    ],
    "alternatives": [
      {
        "planId": "id_example",
        "name": "example",
        "hourlyPriceMicros": "1000000",
        "hourlyPriceUsd": "1.000000",
        "withinAgreed": false
      }
    ],
    "allowSelfStop": false,
    "instanceId": "id_example",
    "serverId": "id_example",
    "requested": {
      "planId": "id_example",
      "templateId": "id_example",
      "diskGb": 1,
      "pricing": "on_demand",
      "fallbackPlanIds": [
        "example"
      ],
      "constraints": {
        "region": "na",
        "hosting": "datacenter",
        "reliability": "high",
        "minCpuCores": 1,
        "minRamGb": 1,
        "minDownMbps": 1,
        "minUpMbps": 1,
        "minCudaMajor": 11,
        "directPorts": false
      },
      "allowSelfStop": false,
      "webTerminal": false,
      "sshKeyIds": [
        "example"
      ],
      "envKeys": [
        "example"
      ],
      "volumeId": "id_example",
      "volumeMountPath": "example",
      "automation": {
        "maxRuntimeHours": null,
        "idle": null,
        "destroyAt": null,
        "stopAt": null,
        "spendCapCents": null,
        "schedule": null
      }
    },
    "decidedAt": "2026-11-21T10:00:00.000Z",
    "createdAt": "2026-11-21T10:00:00.000Z"
  }
}
```

Καταστάσεις σφάλματος: `401`, `403`, `404`, `409`, `429`.

### POST /deployments/{id}/launch-again

Νέα εκκίνηση με τις ρυθμίσεις προηγούμενου αιτήματος

A new request with the settings of this one, whatever its state: failed, cancelled, declined, or one whose server was destroyed. Same label unless you send `label`, and the tags chosen at that launch. Copied: plan, template, disk size, SSH keys, environment variables and secret values, port and start-command overrides, hardware requirements, fallback plans, pricing mode (on-demand or interruptible), the self-stop key option and the browser terminal (while the platform offers it). Not copied: the volume (a volume belongs to one server at a time), automation rules, files on the disk, and per-server credentials (the new server gets its own terminal password and self-stop key). Every rule of `POST /servers` applies again: today's price, the balance check, review of a new organization's first server and capacity, so the answer is the same 201 or 202 as `POST /servers` (409 `plan_unavailable` with `error.alternatives` when the plan is out of stock). Optional body `{ "label": "..." }`. Environment variable values are cleared 24 hours after a server is destroyed (Privacy Policy): repeating a launch after that answers 409 `secret_values_cleared` with the variable names in `error.names` until you send their values again in `secretEnv` (`{ "NAME": "value" }`); they are stored as secret values of the new request. Servers of a serverless endpoint or a server group answer 409 `invalid_state`: change the endpoint or group instead. A copy carries the secret values, so a member whose role covers only their own servers can copy only their own launches (404 otherwise).

**Απαιτούμενο scope:** `servers` · **Δικαίωμα:** `servers.deploy` · **Ασφαλής επανάληψη με:** `Idempotency-Key`

**Παράμετροι**

| Όνομα | Σε | Τύπος | Υποχρεωτικό | Περιγραφή |
| --- | --- | --- | --- | --- |
| `id` | path | string | ναι |  |

**Σώμα αιτήματος**

| Όνομα | Τύπος | Υποχρεωτικό | Περιγραφή |
| --- | --- | --- | --- |
| `label` | string | όχι |  |
| `secretEnv` | object | όχι |  |

**Παράδειγμα αιτήματος (curl)**

```bash
curl -X POST "https://apidly.com/api/v1/deployments/dep_example/launch-again" \
  -H "Authorization: Bearer $APIDLY_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"label":"example","secretEnv":{}}'
```

**JavaScript (SDK)**

```js
await apidly.deployments.launchAgain("dep_example");
```

**Python (SDK)**

```python
client.deployments.launch_again("dep_example")
```

**Εργαλείο γραμμής εντολών:** `apidly deployments` ([Αναφορά CLI](/docs/cli))

**Παράδειγμα απάντησης** (201)

```json
{
  "deployment": {
    "id": "example",
    "planId": "id_example",
    "templateId": "id_example",
    "label": "example",
    "tags": [
      "example"
    ],
    "diskGb": 1,
    "sshKeyIds": [
      "example"
    ],
    "envKeys": [
      "example"
    ],
    "status": "pending_approval",
    "reason": "example",
    "startError": "gpu_unsupported",
    "statusMessage": "example",
    "chargedMicros": "1000000",
    "chargedUsd": "1.000000",
    "chargedSeconds": 1,
    "refundedMicros": "1000000",
    "refundedUsd": "1.000000",
    "hourlyPriceMicros": "1000000",
    "hourlyPriceUsd": "1.000000",
    "storageHourlyMicros": "1000000",
    "storageHourlyUsd": "1.000000",
    "pricing": "on_demand",
    "fallbackPlanIds": [
      "example"
    ],
    "alternatives": [
      {
        "planId": "id_example",
        "name": "example",
        "hourlyPriceMicros": "1000000",
        "hourlyPriceUsd": "1.000000",
        "withinAgreed": false
      }
    ],
    "allowSelfStop": false,
    "instanceId": "id_example",
    "serverId": "id_example",
    "requested": {
      "planId": "id_example",
      "templateId": "id_example",
      "diskGb": 1,
      "pricing": "on_demand",
      "fallbackPlanIds": [
        "example"
      ],
      "constraints": {
        "region": "na",
        "hosting": "datacenter",
        "reliability": "high",
        "minCpuCores": 1,
        "minRamGb": 1,
        "minDownMbps": 1,
        "minUpMbps": 1,
        "minCudaMajor": 11,
        "directPorts": false
      },
      "allowSelfStop": false,
      "webTerminal": false,
      "sshKeyIds": [
        "example"
      ],
      "envKeys": [
        "example"
      ],
      "volumeId": "id_example",
      "volumeMountPath": "example",
      "automation": {
        "maxRuntimeHours": null,
        "idle": null,
        "destroyAt": null,
        "stopAt": null,
        "spendCapCents": null,
        "schedule": null
      }
    },
    "decidedAt": "2026-11-21T10:00:00.000Z",
    "createdAt": "2026-11-21T10:00:00.000Z"
  },
  "server": {
    "id": "example",
    "deploymentId": "id_example",
    "planId": "id_example",
    "templateId": "id_example",
    "label": "example",
    "tags": [
      "example"
    ],
    "note": "example",
    "status": "provisioning",
    "pricing": "on_demand",
    "maxHourlyPriceMicros": "1000000",
    "maxHourlyPriceUsd": "1.000000",
    "interruptedAt": "2026-11-21T10:00:00.000Z",
    "statusMessage": "example",
    "statusReason": "example",
    "startError": "gpu_unsupported",
    "startWarning": "gpu_unsupported",
    "startProgress": {
      "stage": "downloading_image",
      "minutes": 1,
      "elapsedMinutes": 1,
      "percent": 1,
      "message": "example"
    },
    "setupState": "finishing",
    "launchAttempt": {
      "n": 1,
      "of": 1
    },
    "availableUntil": "2026-11-21T10:00:00.000Z",
    "gpuModel": "example",
    "gpuCount": 1,
    "hardware": {
      "cpuName": null,
      "cudaMax": null,
      "diskBwMBs": null,
      "diskName": null,
      "driverVersion": null,
      "gpuMemBwGBs": null,
      "hosting": null,
      "netDownMbps": null,
      "netUpMbps": null,
      "regionGroup": null
    },
    "vramGb": 1,
    "vcpus": 1,
    "ramGb": 1,
    "diskGb": 1,
    "region": "South Korea",
    "regionCode": "KR",
    "continent": "asia",
    "autoExtend": false,
    "keepOnStartError": false,
    "launchMode": "ssh",
    "hourlyPriceMicros": "1000000",
    "hourlyPriceUsd": "1.000000",
    "storageHourlyMicros": "1000000",
    "storageHourlyUsd": "1.000000",
    "reservedUntil": "2026-11-21T10:00:00.000Z",
    "startedAt": "2026-11-21T10:00:00.000Z",
    "stoppedAt": "2026-11-21T10:00:00.000Z",
    "destroyedAt": "2026-11-21T10:00:00.000Z",
    "createdAt": "2026-11-21T10:00:00.000Z",
    "connection": {
      "key": null
    },
    "metrics": {
      "at": null,
      "cpuUtilPct": null,
      "ramUsedMb": null,
      "ramTotalMb": null,
      "gpuUtilPct": null,
      "gpuMemUsedMb": null,
      "gpuMemTotalMb": null,
      "gpuTempC": null,
      "diskUsedPct": null,
      "diskTotalGb": null
    },
    "requested": {
      "planId": null,
      "templateId": null,
      "diskGb": null,
      "pricing": null,
      "fallbackPlanIds": null,
      "constraints": null,
      "allowSelfStop": null,
      "webTerminal": null,
      "sshKeyIds": null,
      "envKeys": null,
      "volumeId": null,
      "volumeMountPath": null,
      "automation": null
    }
  },
  "sourceDeploymentId": "id_example"
}
```

Καταστάσεις σφάλματος: `400`, `401`, `402`, `403`, `404`, `409`, `429`, `503`.

## Ομάδες διακομιστών

### GET /groups

Ομάδες διακομιστών

**Απαιτούμενο scope:** `read`

**Παράδειγμα αιτήματος (curl)**

```bash
curl "https://apidly.com/api/v1/groups" \
  -H "Authorization: Bearer $APIDLY_API_KEY"
```

**JavaScript (SDK)**

```js
await apidly.groups.list();
```

**Python (SDK)**

```python
client.groups.list()
```

**Εργαλείο γραμμής εντολών:** `apidly groups` ([Αναφορά CLI](/docs/cli))

**Παράδειγμα απάντησης** (200)

```json
{
  "groups": [
    {
      "id": "example",
      "name": "example",
      "planId": "id_example",
      "templateId": "id_example",
      "diskGb": 1,
      "sshKeyIds": [
        "example"
      ],
      "envKeys": [
        "example"
      ],
      "maxHourlyPriceMicros": "1000000",
      "maxHourlyPriceUsd": "1.000000",
      "desiredCount": 1,
      "minCount": 1,
      "maxCount": 1,
      "scaleDown": "stop",
      "schedule": {
        "key": null
      },
      "status": "active",
      "pausedReason": "example",
      "pausedAt": "2026-11-21T10:00:00.000Z",
      "createdAt": "2026-11-21T10:00:00.000Z"
    }
  ]
}
```

Καταστάσεις σφάλματος: `401`, `403`, `429`.

### POST /groups

Δημιουργία ομάδας διακομιστών

**Απαιτούμενο scope:** `full` · **Ρόλος δημιουργού:** `admin`

**Σώμα αιτήματος**

| Όνομα | Τύπος | Υποχρεωτικό | Περιγραφή |
| --- | --- | --- | --- |
| `name` | string | ναι |  |
| `planId` | string | ναι |  |
| `templateId` | string | ναι |  |
| `diskGb` | integer | ναι |  |
| `sshKeyIds` | πίνακας από string | όχι |  |
| `env` | object | όχι |  |
| `maxHourlyPriceCents` | number ή null | όχι |  |
| `desiredCount` | integer | ναι |  |
| `minCount` | integer ή null | όχι |  |
| `maxCount` | integer ή null | όχι |  |
| `scaleDown` | `stop` \| `destroy` | όχι |  |
| `schedule` | object ή null | όχι |  |

**Παράδειγμα αιτήματος (curl)**

```bash
curl -X POST "https://apidly.com/api/v1/groups" \
  -H "Authorization: Bearer $APIDLY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name":"example","planId":"id_example","templateId":"id_example","diskGb":1,"desiredCount":0}'
```

**JavaScript (SDK)**

```js
await apidly.groups.create({
  name: "example",
  planId: "id_example",
  templateId: "id_example",
  diskGb: 1,
  desiredCount: 0
});
```

**Python (SDK)**

```python
client.groups.create(body={
    "name": "example",
    "planId": "id_example",
    "templateId": "id_example",
    "diskGb": 1,
    "desiredCount": 0,
})
```

**Εργαλείο γραμμής εντολών:** `apidly groups` ([Αναφορά CLI](/docs/cli))

**Παράδειγμα απάντησης** (201)

```json
{
  "group": {
    "id": "example",
    "name": "example",
    "planId": "id_example",
    "templateId": "id_example",
    "diskGb": 1,
    "sshKeyIds": [
      "example"
    ],
    "envKeys": [
      "example"
    ],
    "maxHourlyPriceMicros": "1000000",
    "maxHourlyPriceUsd": "1.000000",
    "desiredCount": 1,
    "minCount": 1,
    "maxCount": 1,
    "scaleDown": "stop",
    "schedule": {
      "key": null
    },
    "status": "active",
    "pausedReason": "example",
    "pausedAt": "2026-11-21T10:00:00.000Z",
    "createdAt": "2026-11-21T10:00:00.000Z"
  }
}
```

Καταστάσεις σφάλματος: `400`, `401`, `403`, `409`, `429`.

### GET /groups/{id}

Μία ομάδα με τους διακομιστές της

**Απαιτούμενο scope:** `read`

**Παράμετροι**

| Όνομα | Σε | Τύπος | Υποχρεωτικό | Περιγραφή |
| --- | --- | --- | --- | --- |
| `id` | path | string | ναι |  |

**Παράδειγμα αιτήματος (curl)**

```bash
curl "https://apidly.com/api/v1/groups/group_example" \
  -H "Authorization: Bearer $APIDLY_API_KEY"
```

**JavaScript (SDK)**

```js
await apidly.groups.get("group_example");
```

**Python (SDK)**

```python
client.groups.get("group_example")
```

**Εργαλείο γραμμής εντολών:** `apidly groups` ([Αναφορά CLI](/docs/cli))

**Παράδειγμα απάντησης** (200)

```json
{
  "key": null
}
```

Καταστάσεις σφάλματος: `401`, `403`, `404`, `429`.

### PATCH /groups/{id}

Ενημέρωση ομάδας διακομιστών

**Απαιτούμενο scope:** `full` · **Ρόλος δημιουργού:** `admin`

**Παράμετροι**

| Όνομα | Σε | Τύπος | Υποχρεωτικό | Περιγραφή |
| --- | --- | --- | --- | --- |
| `id` | path | string | ναι |  |

**Σώμα αιτήματος**

| Όνομα | Τύπος | Υποχρεωτικό | Περιγραφή |
| --- | --- | --- | --- |
| `name` | string | όχι |  |
| `desiredCount` | integer | όχι |  |
| `minCount` | integer ή null | όχι |  |
| `maxCount` | integer ή null | όχι |  |
| `scaleDown` | `stop` \| `destroy` | όχι |  |
| `schedule` | object ή null | όχι |  |
| `maxHourlyPriceCents` | number ή null | όχι |  |

**Παράδειγμα αιτήματος (curl)**

```bash
curl -X PATCH "https://apidly.com/api/v1/groups/group_example" \
  -H "Authorization: Bearer $APIDLY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name":"example","desiredCount":0,"minCount":0}'
```

**JavaScript (SDK)**

```js
await apidly.groups.update("group_example", {
  name: "example",
  desiredCount: 0,
  minCount: 0
});
```

**Python (SDK)**

```python
client.groups.update("group_example", body={
    "name": "example",
    "desiredCount": 0,
    "minCount": 0,
})
```

**Εργαλείο γραμμής εντολών:** `apidly groups` ([Αναφορά CLI](/docs/cli))

**Παράδειγμα απάντησης** (200)

```json
{
  "group": {
    "id": "example",
    "name": "example",
    "planId": "id_example",
    "templateId": "id_example",
    "diskGb": 1,
    "sshKeyIds": [
      "example"
    ],
    "envKeys": [
      "example"
    ],
    "maxHourlyPriceMicros": "1000000",
    "maxHourlyPriceUsd": "1.000000",
    "desiredCount": 1,
    "minCount": 1,
    "maxCount": 1,
    "scaleDown": "stop",
    "schedule": {
      "key": null
    },
    "status": "active",
    "pausedReason": "example",
    "pausedAt": "2026-11-21T10:00:00.000Z",
    "createdAt": "2026-11-21T10:00:00.000Z"
  }
}
```

Καταστάσεις σφάλματος: `400`, `401`, `403`, `404`, `429`.

### DELETE /groups/{id}

Διαγραφή ομάδας (οι διακομιστές της συνεχίζουν να εκτελούνται, χωρίς διαχείριση)

**Απαιτούμενο scope:** `full` · **Ρόλος δημιουργού:** `admin`

**Παράμετροι**

| Όνομα | Σε | Τύπος | Υποχρεωτικό | Περιγραφή |
| --- | --- | --- | --- | --- |
| `id` | path | string | ναι |  |

**Παράδειγμα αιτήματος (curl)**

```bash
curl -X DELETE "https://apidly.com/api/v1/groups/group_example" \
  -H "Authorization: Bearer $APIDLY_API_KEY"
```

**JavaScript (SDK)**

```js
await apidly.groups.delete("group_example");
```

**Python (SDK)**

```python
client.groups.delete("group_example")
```

**Εργαλείο γραμμής εντολών:** `apidly groups` ([Αναφορά CLI](/docs/cli))

**Παράδειγμα απάντησης** (200)

```json
{
  "deleted": false
}
```

Καταστάσεις σφάλματος: `401`, `403`, `404`, `429`.

### POST /groups/{id}/{action}

Παύση ή συνέχιση ομάδας

**Απαιτούμενο scope:** `servers` · **Ρόλος δημιουργού:** `admin`

**Παράμετροι**

| Όνομα | Σε | Τύπος | Υποχρεωτικό | Περιγραφή |
| --- | --- | --- | --- | --- |
| `id` | path | string | ναι |  |
| `action` | path | `pause` \| `resume` | ναι |  |

**Παράδειγμα αιτήματος (curl)**

```bash
curl -X POST "https://apidly.com/api/v1/groups/group_example/pause" \
  -H "Authorization: Bearer $APIDLY_API_KEY"
```

**Python (SDK)**

```python
client.groups.pause("group_example")
client.groups.resume("group_example")
```

**Εργαλείο γραμμής εντολών:** `apidly groups` ([Αναφορά CLI](/docs/cli))

**Παράδειγμα απάντησης** (200)

```json
{
  "group": {
    "id": "example",
    "name": "example",
    "planId": "id_example",
    "templateId": "id_example",
    "diskGb": 1,
    "sshKeyIds": [
      "example"
    ],
    "envKeys": [
      "example"
    ],
    "maxHourlyPriceMicros": "1000000",
    "maxHourlyPriceUsd": "1.000000",
    "desiredCount": 1,
    "minCount": 1,
    "maxCount": 1,
    "scaleDown": "stop",
    "schedule": {
      "key": null
    },
    "status": "active",
    "pausedReason": "example",
    "pausedAt": "2026-11-21T10:00:00.000Z",
    "createdAt": "2026-11-21T10:00:00.000Z"
  }
}
```

Καταστάσεις σφάλματος: `401`, `403`, `404`, `409`, `429`.
