# เอกสารอ้างอิง API: ที่เก็บข้อมูล

ที่เก็บข้อมูล: ทุกการดำเนินการของ API v1 พร้อมสโคปที่ต้องใช้ พารามิเตอร์ ตัวอย่างใน curl, JavaScript และ Python และผลลัพธ์ที่ได้ การยืนยันตัวตน ข้อผิดพลาด การแบ่งหน้า ขีดจำกัด และ idempotency อยู่ใน[ภาพรวมเอกสารอ้างอิง API](/docs/api-reference) ดูเพิ่มเติมที่ [SDK](/docs/sdks) และ[บรรทัดคำสั่ง](/docs/cli)

> ลองใช้กับคีย์ของคุณ: สร้างคีย์ API ในคอนโซล รัน `export APIDLY_API_KEY=...` ในเทอร์มินัล แล้ววางตัวอย่าง curl ด้านล่าง ค่าในตัวอย่างเป็นเพียงภาพประกอบ หน้านี้ไม่มีช่องให้กรอกคีย์

คำอธิบายของการดำเนินการและฟิลด์มาจากนิยามของ API และเป็นภาษาอังกฤษ

| การดำเนินการ | สโคปที่ต้องใช้ | สรุป |
| --- | --- | --- |
| `GET /volumes` | `read` | วอลุ่มถาวร |
| `POST /volumes` | `full` | สร้างวอลุ่ม |
| `GET /volumes/options` | `read` | ราคาวอลุ่มสำหรับแพ็กเกจ GPU |
| `GET /volumes/offers` | `read` | Deprecated alias of GET /volumes/options |
| `GET /volumes/{id}/availability` | `read` | เซิร์ฟเวอร์ที่ใช้วอลุ่มนี้เริ่มได้ตอนนี้หรือไม่ |
| `GET /volumes/{id}` | `read` | วอลุ่มหนึ่งรายการ |
| `PATCH /volumes/{id}` | `full` | เปลี่ยนชื่อวอลุ่ม |
| `DELETE /volumes/{id}` | `full` | ลบวอลุ่ม (`?confirm=` ชื่อของมัน) |
| `GET /transfers` | `read` | การถ่ายโอนข้อมูล ใหม่สุดก่อน |
| `POST /transfers` | `servers` | คัดลอกข้อมูลระหว่างเซิร์ฟเวอร์ |
| `GET /transfers/{id}` | `read` | การถ่ายโอนหนึ่งรายการ |
| `DELETE /transfers/{id}` | `full` | ยกเลิกการถ่ายโอนที่กำลังทำงาน |
| `GET /volumes/fit` | `read` | วอลุ่มว่างที่เซิร์ฟเวอร์ของแพ็กเกจนี้เมานต์ได้ |

### GET /volumes

วอลุ่มถาวร

Mount one by passing `volumeId` (and optionally `volumeMountPath`) when you request a server with `POST /deployments`.

**สโคปที่ต้องใช้:** `read` · **สิทธิ์:** `servers.view`

**พารามิเตอร์**

| ชื่อ | ตำแหน่ง | ชนิด | จำเป็น | คำอธิบาย |
| --- | --- | --- | --- | --- |
| `limit` | query | integer | ไม่ |  |
| `cursor` | query | string | ไม่ |  |

**ตัวอย่างคำขอ (curl)**

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

**JavaScript (SDK)**

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

**Python (SDK)**

```python
client.volumes.list()
```

**เครื่องมือบรรทัดคำสั่ง:** `apidly volumes`, `apidly export`, `apidly plan`, `apidly apply` ([เอกสารอ้างอิง CLI](/docs/cli))

**ตัวอย่างผลลัพธ์** (200)

```json
{
  "volumes": [
    {
      "id": "example",
      "name": "example",
      "sizeGb": 1,
      "status": "example",
      "instanceId": "id_example",
      "region": "South Korea",
      "regionCode": "KR",
      "planId": "id_example",
      "hourlyPriceMicros": "1000000",
      "hourlyPriceUsd": "1.000000",
      "scheduledDeletionAt": "2026-11-21T10:00:00.000Z",
      "attachable": false,
      "legacy": false,
      "createdAt": "2026-11-21T10:00:00.000Z"
    }
  ],
  "limits": {
    "minGb": 1,
    "maxGb": 1
  },
  "nextCursor": "example"
}
```

สถานะข้อผิดพลาด: `401`, `403`, `429`.

### POST /volumes

สร้างวอลุ่ม

A volume lives on one machine and only a server on that machine can mount it. Send the `planId` of the GPU plan you will use and the `shownHourlyMicros` from `GET /volumes/options?planId=`: the volume is created on a machine that offers that plan right now, and every server that mounts it runs there. Billed per second from creation until it is deleted; the balance must cover its first day (402). Refused when the price rose (409 `price_changed`), when no machine of the plan has room for the size (409 `no_volume_space`), and without `planId` (400 `volume_plan_required`; `region` alone is no longer accepted).

**สโคปที่ต้องใช้:** `full` · **สิทธิ์:** `servers.deploy` · **ลองซ้ำได้อย่างปลอดภัยด้วย:** `Idempotency-Key`

**เนื้อหาคำขอ**

| ชื่อ | ชนิด | จำเป็น | คำอธิบาย |
| --- | --- | --- | --- |
| `name` | string | ใช่ |  |
| `sizeGb` | integer | ใช่ |  |
| `planId` | string | ไม่ |  |
| `region` | string | ไม่ |  |
| `shownHourlyMicros` | string | ใช่ |  |

**ตัวอย่างคำขอ (curl)**

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

**JavaScript (SDK)**

```js
await apidly.volumes.create({
  name: "example",
  sizeGb: 10,
  shownHourlyMicros: "example"
});
```

**Python (SDK)**

```python
client.volumes.create(name="example", size_gb=10)
```

**เครื่องมือบรรทัดคำสั่ง:** `apidly volumes`, `apidly apply` ([เอกสารอ้างอิง CLI](/docs/cli))

**ตัวอย่างผลลัพธ์** (201)

```json
{
  "volume": {
    "id": "example",
    "name": "example",
    "sizeGb": 1,
    "status": "example",
    "instanceId": "id_example",
    "region": "South Korea",
    "regionCode": "KR",
    "planId": "id_example",
    "hourlyPriceMicros": "1000000",
    "hourlyPriceUsd": "1.000000",
    "scheduledDeletionAt": "2026-11-21T10:00:00.000Z",
    "attachable": false,
    "legacy": false,
    "createdAt": "2026-11-21T10:00:00.000Z"
  }
}
```

สถานะข้อผิดพลาด: `400`, `401`, `402`, `403`, `409`, `429`.

### GET /volumes/options

ราคาวอลุ่มสำหรับแพ็กเกจ GPU

With `planId`: `option` is the price of a volume of `sizeGb` on a machine that has that plan now (`offer` is its deprecated name, same object) (409 `no_volume_space` when none has room). `perGbMonthMicros` is our price per GB per 30-day month. Without `planId`: storage prices by region only, kept for older clients (a volume cannot be created from them).

**สโคปที่ต้องใช้:** `read`

**พารามิเตอร์**

| ชื่อ | ตำแหน่ง | ชนิด | จำเป็น | คำอธิบาย |
| --- | --- | --- | --- | --- |
| `sizeGb` | query | integer | ใช่ |  |
| `planId` | query | string | ไม่ |  |

**ตัวอย่างคำขอ (curl)**

```bash
curl "https://apidly.com/api/v1/volumes/options?sizeGb=10" \
  -H "Authorization: Bearer $APIDLY_API_KEY"
```

**JavaScript (SDK)**

```js
await apidly.volumes.options(10);
```

**Python (SDK)**

```python
client.volumes.options(size_gb="example")
```

**เครื่องมือบรรทัดคำสั่ง:** `apidly volumes`, `apidly plan`, `apidly apply` ([เอกสารอ้างอิง CLI](/docs/cli))

**ตัวอย่างผลลัพธ์** (200)

```json
{
  "sizeGb": 1,
  "option": {
    "planId": "id_example",
    "region": "example",
    "hourlyMicros": "1000000",
    "hourlyUsd": "1.000000",
    "monthlyMicros": "1000000",
    "monthlyUsd": "1.000000",
    "perGbMonthMicros": "1000000",
    "perGbMonthUsd": "1.000000",
    "maxSizeGb": 1
  },
  "offer": {
    "planId": "id_example",
    "region": "example",
    "hourlyMicros": "1000000",
    "hourlyUsd": "1.000000",
    "monthlyMicros": "1000000",
    "monthlyUsd": "1.000000",
    "perGbMonthMicros": "1000000",
    "perGbMonthUsd": "1.000000",
    "maxSizeGb": 1
  },
  "regions": [
    {
      "region": "example",
      "hourlyMicros": "1000000",
      "hourlyUsd": "1.000000",
      "monthlyMicros": "1000000",
      "monthlyUsd": "1.000000",
      "maxSizeGb": 1
    }
  ]
}
```

สถานะข้อผิดพลาด: `400`, `401`, `403`, `404`, `409`, `429`.

### GET /volumes/offers

Deprecated alias of GET /volumes/options

Same query and answer as `GET /volumes/options`; answered until 2027-05-31. Use `GET /volumes/options`.

**สโคปที่ต้องใช้:** `read`

**พารามิเตอร์**

| ชื่อ | ตำแหน่ง | ชนิด | จำเป็น | คำอธิบาย |
| --- | --- | --- | --- | --- |
| `sizeGb` | query | integer | ใช่ |  |
| `planId` | query | string | ไม่ |  |

**ตัวอย่างคำขอ (curl)**

```bash
curl "https://apidly.com/api/v1/volumes/offers?sizeGb=10" \
  -H "Authorization: Bearer $APIDLY_API_KEY"
```

**JavaScript (SDK)**

```js
await apidly.volumes.offers(10);
```

**Python (SDK)**

```python
client.volumes.offers(size_gb="example")
```

**เครื่องมือบรรทัดคำสั่ง:** `apidly volumes` ([เอกสารอ้างอิง CLI](/docs/cli))

**ตัวอย่างผลลัพธ์** (200)

```json
{
  "sizeGb": 1,
  "option": {
    "planId": "id_example",
    "region": "example",
    "hourlyMicros": "1000000",
    "hourlyUsd": "1.000000",
    "monthlyMicros": "1000000",
    "monthlyUsd": "1.000000",
    "perGbMonthMicros": "1000000",
    "perGbMonthUsd": "1.000000",
    "maxSizeGb": 1
  },
  "offer": {
    "planId": "id_example",
    "region": "example",
    "hourlyMicros": "1000000",
    "hourlyUsd": "1.000000",
    "monthlyMicros": "1000000",
    "monthlyUsd": "1.000000",
    "perGbMonthMicros": "1000000",
    "perGbMonthUsd": "1.000000",
    "maxSizeGb": 1
  },
  "regions": [
    {
      "region": "example",
      "hourlyMicros": "1000000",
      "hourlyUsd": "1.000000",
      "monthlyMicros": "1000000",
      "monthlyUsd": "1.000000",
      "maxSizeGb": 1
    }
  ]
}
```

สถานะข้อผิดพลาด: `400`, `401`, `403`, `404`, `409`, `429`.

### GET /volumes/{id}/availability

เซิร์ฟเวอร์ที่ใช้วอลุ่มนี้เริ่มได้ตอนนี้หรือไม่

A volume is tied to one machine. `state`: `available_now` (the `plans` listed can start there now), `busy` (its GPU is rented by someone else; try again later), `no_fit` (an older volume placed by region only, where none of the plans checked can run: delete it to stop its charge), `in_use` (mounted by a server), `legacy` (no storage behind it), `unknown` (the host could not be asked).

**สโคปที่ต้องใช้:** `read` · **สิทธิ์:** `servers.view`

**พารามิเตอร์**

| ชื่อ | ตำแหน่ง | ชนิด | จำเป็น | คำอธิบาย |
| --- | --- | --- | --- | --- |
| `id` | path | string | ใช่ |  |

**ตัวอย่างคำขอ (curl)**

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

**JavaScript (SDK)**

```js
await apidly.volumes.availability("volume_example");
```

**Python (SDK)**

```python
client.volumes.availability("volume_example")
```

**เครื่องมือบรรทัดคำสั่ง:** `apidly volumes` ([เอกสารอ้างอิง CLI](/docs/cli))

**ตัวอย่างผลลัพธ์** (200)

```json
{
  "availability": {
    "volumeId": "id_example",
    "state": "available_now",
    "plans": [
      {
        "id": "example",
        "slug": "example",
        "name": "example",
        "gpuModel": "example",
        "gpuCount": 1,
        "hourlyPriceMicros": "1000000",
        "hourlyPriceUsd": "1.000000"
      }
    ],
    "checkedAt": "2026-11-21T10:00:00.000Z"
  }
}
```

สถานะข้อผิดพลาด: `401`, `403`, `404`, `429`.

### GET /volumes/{id}

วอลุ่มหนึ่งรายการ

**สโคปที่ต้องใช้:** `read` · **สิทธิ์:** `servers.view`

**พารามิเตอร์**

| ชื่อ | ตำแหน่ง | ชนิด | จำเป็น | คำอธิบาย |
| --- | --- | --- | --- | --- |
| `id` | path | string | ใช่ |  |

**ตัวอย่างคำขอ (curl)**

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

**JavaScript (SDK)**

```js
await apidly.volumes.get("volume_example");
```

**Python (SDK)**

```python
client.volumes.get("volume_example")
```

**เครื่องมือบรรทัดคำสั่ง:** `apidly volumes` ([เอกสารอ้างอิง CLI](/docs/cli))

**ตัวอย่างผลลัพธ์** (200)

```json
{
  "volume": {
    "id": "example",
    "name": "example",
    "sizeGb": 1,
    "status": "example",
    "instanceId": "id_example",
    "region": "South Korea",
    "regionCode": "KR",
    "planId": "id_example",
    "hourlyPriceMicros": "1000000",
    "hourlyPriceUsd": "1.000000",
    "scheduledDeletionAt": "2026-11-21T10:00:00.000Z",
    "attachable": false,
    "legacy": false,
    "createdAt": "2026-11-21T10:00:00.000Z"
  }
}
```

สถานะข้อผิดพลาด: `401`, `403`, `404`, `429`.

### PATCH /volumes/{id}

เปลี่ยนชื่อวอลุ่ม

Changes the volume's name only. Nothing changes on the host and a mounted volume keeps working; deleting it then asks for the new name.

**สโคปที่ต้องใช้:** `full` · **สิทธิ์:** `storage.manage`

**พารามิเตอร์**

| ชื่อ | ตำแหน่ง | ชนิด | จำเป็น | คำอธิบาย |
| --- | --- | --- | --- | --- |
| `id` | path | string | ใช่ |  |

**เนื้อหาคำขอ**

| ชื่อ | ชนิด | จำเป็น | คำอธิบาย |
| --- | --- | --- | --- |
| `name` | string | ใช่ |  |

**ตัวอย่างคำขอ (curl)**

```bash
curl -X PATCH "https://apidly.com/api/v1/volumes/volume_example" \
  -H "Authorization: Bearer $APIDLY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name":"example"}'
```

**JavaScript (SDK)**

```js
await apidly.volumes.rename("volume_example", "example");
```

**Python (SDK)**

```python
client.volumes.rename("volume_example", name="example")
```

**เครื่องมือบรรทัดคำสั่ง:** `apidly volumes` ([เอกสารอ้างอิง CLI](/docs/cli))

**ตัวอย่างผลลัพธ์** (200)

```json
{
  "volume": {
    "id": "example",
    "name": "example",
    "sizeGb": 1,
    "status": "example",
    "instanceId": "id_example",
    "region": "South Korea",
    "regionCode": "KR",
    "planId": "id_example",
    "hourlyPriceMicros": "1000000",
    "hourlyPriceUsd": "1.000000",
    "scheduledDeletionAt": "2026-11-21T10:00:00.000Z",
    "attachable": false,
    "legacy": false,
    "createdAt": "2026-11-21T10:00:00.000Z"
  }
}
```

สถานะข้อผิดพลาด: `400`, `401`, `403`, `404`, `429`.

### DELETE /volumes/{id}

ลบวอลุ่ม (`?confirm=` ชื่อของมัน)

The data is deleted for good.

**สโคปที่ต้องใช้:** `full` · **สิทธิ์:** `storage.manage`

**พารามิเตอร์**

| ชื่อ | ตำแหน่ง | ชนิด | จำเป็น | คำอธิบาย |
| --- | --- | --- | --- | --- |
| `id` | path | string | ใช่ |  |
| `confirm` | query | string | ใช่ |  |

**ตัวอย่างคำขอ (curl)**

```bash
curl -X DELETE "https://apidly.com/api/v1/volumes/volume_example?confirm=example" \
  -H "Authorization: Bearer $APIDLY_API_KEY"
```

**JavaScript (SDK)**

```js
await apidly.volumes.delete("volume_example", "example");
```

**Python (SDK)**

```python
client.volumes.delete("volume_example", confirm="example")
```

**เครื่องมือบรรทัดคำสั่ง:** `apidly volumes` ([เอกสารอ้างอิง CLI](/docs/cli))

**ตัวอย่างผลลัพธ์** (200)

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

สถานะข้อผิดพลาด: `400`, `401`, `403`, `404`, `409`, `429`.

### GET /transfers

การถ่ายโอนข้อมูล ใหม่สุดก่อน

**สโคปที่ต้องใช้:** `read`

**พารามิเตอร์**

| ชื่อ | ตำแหน่ง | ชนิด | จำเป็น | คำอธิบาย |
| --- | --- | --- | --- | --- |
| `limit` | query | integer | ไม่ |  |
| `cursor` | query | string | ไม่ |  |

**ตัวอย่างคำขอ (curl)**

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

**JavaScript (SDK)**

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

**Python (SDK)**

```python
client.transfers.list()
```

**เครื่องมือบรรทัดคำสั่ง:** `apidly transfers` ([เอกสารอ้างอิง CLI](/docs/cli))

**ตัวอย่างผลลัพธ์** (200)

```json
{
  "transfers": [
    {
      "id": "example",
      "kind": "copy",
      "status": "running",
      "srcInstanceId": "id_example",
      "dstInstanceId": "id_example",
      "srcPath": "example",
      "dstPath": "example",
      "connectionId": "id_example",
      "scheduled": false,
      "percent": 1,
      "phase": "copying",
      "reason": "example",
      "message": "example",
      "createdAt": "2026-11-21T10:00:00.000Z",
      "finishedAt": "2026-11-21T10:00:00.000Z"
    }
  ],
  "nextCursor": "example"
}
```

สถานะข้อผิดพลาด: `401`, `403`, `429`.

### POST /transfers

คัดลอกข้อมูลระหว่างเซิร์ฟเวอร์

Both servers must be running. Other transfer kinds answer 404 `feature_unavailable` while they are not available on your account.

**สโคปที่ต้องใช้:** `servers` · **ลองซ้ำได้อย่างปลอดภัยด้วย:** `Idempotency-Key`

**ตัวอย่างคำขอ (curl)**

```bash
curl -X POST "https://apidly.com/api/v1/transfers" \
  -H "Authorization: Bearer $APIDLY_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"kind":"copy","srcInstanceId":"id_example","dstInstanceId":"id_example","srcPath":"example","dstPath":"example"}'
```

**JavaScript (SDK)**

```js
await apidly.transfers.start({
  kind: "copy",
  srcInstanceId: "id_example",
  dstInstanceId: "id_example",
  srcPath: "example",
  dstPath: "example"
});
```

**Python (SDK)**

```python
client.transfers.start(body={
    "kind": "copy",
    "srcInstanceId": "id_example",
    "dstInstanceId": "id_example",
    "srcPath": "example",
    "dstPath": "example",
})
```

**เครื่องมือบรรทัดคำสั่ง:** `apidly transfers` ([เอกสารอ้างอิง CLI](/docs/cli))

**ตัวอย่างผลลัพธ์** (201)

```json
{
  "transfer": {
    "id": "example",
    "kind": "copy",
    "status": "running",
    "srcInstanceId": "id_example",
    "dstInstanceId": "id_example",
    "srcPath": "example",
    "dstPath": "example",
    "connectionId": "id_example",
    "scheduled": false,
    "percent": 1,
    "phase": "copying",
    "reason": "example",
    "message": "example",
    "createdAt": "2026-11-21T10:00:00.000Z",
    "finishedAt": "2026-11-21T10:00:00.000Z"
  }
}
```

สถานะข้อผิดพลาด: `400`, `401`, `403`, `404`, `409`, `429`.

### GET /transfers/{id}

การถ่ายโอนหนึ่งรายการ

**สโคปที่ต้องใช้:** `read`

**พารามิเตอร์**

| ชื่อ | ตำแหน่ง | ชนิด | จำเป็น | คำอธิบาย |
| --- | --- | --- | --- | --- |
| `id` | path | string | ใช่ |  |

**ตัวอย่างคำขอ (curl)**

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

**JavaScript (SDK)**

```js
await apidly.transfers.get("transfer_example");
```

**Python (SDK)**

```python
client.transfers.get("transfer_example")
```

**เครื่องมือบรรทัดคำสั่ง:** `apidly transfers` ([เอกสารอ้างอิง CLI](/docs/cli))

**ตัวอย่างผลลัพธ์** (200)

```json
{
  "transfer": {
    "id": "example",
    "kind": "copy",
    "status": "running",
    "srcInstanceId": "id_example",
    "dstInstanceId": "id_example",
    "srcPath": "example",
    "dstPath": "example",
    "connectionId": "id_example",
    "scheduled": false,
    "percent": 1,
    "phase": "copying",
    "reason": "example",
    "message": "example",
    "createdAt": "2026-11-21T10:00:00.000Z",
    "finishedAt": "2026-11-21T10:00:00.000Z"
  }
}
```

สถานะข้อผิดพลาด: `401`, `403`, `404`, `429`.

### DELETE /transfers/{id}

ยกเลิกการถ่ายโอนที่กำลังทำงาน

**สโคปที่ต้องใช้:** `full`

**พารามิเตอร์**

| ชื่อ | ตำแหน่ง | ชนิด | จำเป็น | คำอธิบาย |
| --- | --- | --- | --- | --- |
| `id` | path | string | ใช่ |  |

**ตัวอย่างคำขอ (curl)**

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

**JavaScript (SDK)**

```js
await apidly.transfers.cancel("transfer_example");
```

**Python (SDK)**

```python
client.transfers.cancel("transfer_example")
```

**เครื่องมือบรรทัดคำสั่ง:** `apidly transfers` ([เอกสารอ้างอิง CLI](/docs/cli))

**ตัวอย่างผลลัพธ์** (200)

```json
{
  "transfer": {
    "id": "example",
    "kind": "copy",
    "status": "running",
    "srcInstanceId": "id_example",
    "dstInstanceId": "id_example",
    "srcPath": "example",
    "dstPath": "example",
    "connectionId": "id_example",
    "scheduled": false,
    "percent": 1,
    "phase": "copying",
    "reason": "example",
    "message": "example",
    "createdAt": "2026-11-21T10:00:00.000Z",
    "finishedAt": "2026-11-21T10:00:00.000Z"
  }
}
```

สถานะข้อผิดพลาด: `401`, `403`, `404`, `409`, `429`.

### GET /volumes/fit

วอลุ่มว่างที่เซิร์ฟเวอร์ของแพ็กเกจนี้เมานต์ได้

A volume lives on one machine, so a server that mounts it must run there. `fits` lists the ids of the organization's free volumes whose machine can host the plan now (a volume whose fit cannot be told right now counts as fitting); `checked` is how many were looked at (at most 20).

**สโคปที่ต้องใช้:** `read` · **สิทธิ์:** `servers.view`

**พารามิเตอร์**

| ชื่อ | ตำแหน่ง | ชนิด | จำเป็น | คำอธิบาย |
| --- | --- | --- | --- | --- |
| `plan` | query | string | ใช่ |  |

**ตัวอย่างคำขอ (curl)**

```bash
curl "https://apidly.com/api/v1/volumes/fit?plan=example" \
  -H "Authorization: Bearer $APIDLY_API_KEY"
```

**JavaScript (SDK)**

```js
await apidly.volumes.fit("example");
```

**Python (SDK)**

```python
client.volumes.fit(plan="example")
```

**เครื่องมือบรรทัดคำสั่ง:** `apidly volumes` ([เอกสารอ้างอิง CLI](/docs/cli))

**ตัวอย่างผลลัพธ์** (200)

```json
{
  "fits": [
    "example"
  ],
  "checked": 1
}
```

สถานะข้อผิดพลาด: `400`, `401`, `403`, `429`.
