Přeskočit na hlavní obsah
Apidly Cloud
Zásady používání cookies

Analytické a reklamní cookies zůstanou vypnuté, dokud je nepřijmete. Zásady používání cookies

Rádi bychom používali Google Analytics a Microsoft Clarity, abychom pochopili, jak se používají veřejné stránky, včetně zobrazení stránek a záznamů relací, a Reddit Pixel, abychom změřili, zda naše reklamy na Redditu vedou k návštěvám a registracím. Zde si vyberete, zda jsou zapnuté. Odmítnutí nemění nic na fungování webu.

Reference API: Úložiště

Operace API v1 pro Úložiště: scope, parametry, příklady v curl, JavaScriptu a Pythonu a odpovědi.

Naposledy aktualizováno 21. listopadu 20266 min čtení
Zobrazit jako Markdown

Úložiště: všechny operace API v1 s požadovaným scope, parametry, příklady v curl, JavaScriptu a Pythonu a odpověďmi. Ověřování, chyby, stránkování, limity a idempotence jsou v přehledu reference API; viz také SDK a příkazový řádek.

Vyzkoušejte se svým klíčem: vytvořte v konzoli klíč API, v terminálu spusťte export APIDLY_API_KEY=... a vložte libovolný příklad curl níže. Hodnoty v příkladech jsou ilustrační. Na této stránce není žádné pole pro zadání klíče.

Popisy operací a polí pocházejí z definice API a jsou anglicky.

Operace Požadovaný scope Shrnutí
GET /volumes read Trvalé svazky
POST /volumes full Vytvořit svazek
GET /volumes/options read Cena svazku pro tarif GPU
GET /volumes/offers read Deprecated alias of GET /volumes/options
GET /volumes/{id}/availability read Může se server s tímto svazkem spustit teď
GET /volumes/{id} read Jeden svazek
PATCH /volumes/{id} full Přejmenovat svazek
DELETE /volumes/{id} full Smazat svazek (?confirm= jeho název)
GET /transfers read Přenosy dat, nejnovější první
POST /transfers servers Kopírovat data mezi servery
GET /transfers/{id} read Jeden přenos
DELETE /transfers/{id} full Zrušit běžící přenos
GET /volumes/fit read Volné svazky, které může server tohoto tarifu připojit

GET /volumes

Trvalé svazky

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

Požadovaný scope: read · Oprávnění: servers.view

Parametry

Název V Typ Povinné Popis
limit query integer ne
cursor query string ne

Příklad požadavku (curl)

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

JavaScript (SDK)

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

Python (SDK)

client.volumes.list()

Nástroj příkazového řádku: apidly volumes, apidly export, apidly plan, apidly apply (Reference CLI)

Příklad odpovědi (200)

{
  "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"
}

Chybové stavy: 401, 403, 429.

POST /volumes

Vytvořit svazek

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).

Požadovaný scope: full · Oprávnění: servers.deploy · Bezpečně opakovat s: Idempotency-Key

Tělo požadavku

Název Typ Povinné Popis
name string ano
sizeGb integer ano
planId string ne
region string ne
shownHourlyMicros string ano

Příklad požadavku (curl)

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)

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

Python (SDK)

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

Nástroj příkazového řádku: apidly volumes, apidly apply (Reference CLI)

Příklad odpovědi (201)

{
  "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"
  }
}

Chybové stavy: 400, 401, 402, 403, 409, 429.

GET /volumes/options

Cena svazku pro tarif 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).

Požadovaný scope: read

Parametry

Název V Typ Povinné Popis
sizeGb query integer ano
planId query string ne

Příklad požadavku (curl)

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

JavaScript (SDK)

await apidly.volumes.options(10);

Python (SDK)

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

Nástroj příkazového řádku: apidly volumes, apidly plan, apidly apply (Reference CLI)

Příklad odpovědi (200)

{
  "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
    }
  ]
}

Chybové stavy: 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.

Požadovaný scope: read

Parametry

Název V Typ Povinné Popis
sizeGb query integer ano
planId query string ne

Příklad požadavku (curl)

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

JavaScript (SDK)

await apidly.volumes.offers(10);

Python (SDK)

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

Nástroj příkazového řádku: apidly volumes (Reference CLI)

Příklad odpovědi (200)

{
  "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
    }
  ]
}

Chybové stavy: 400, 401, 403, 404, 409, 429.

GET /volumes/{id}/availability

Může se server s tímto svazkem spustit teď

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).

Požadovaný scope: read · Oprávnění: servers.view

Parametry

Název V Typ Povinné Popis
id path string ano

Příklad požadavku (curl)

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

JavaScript (SDK)

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

Python (SDK)

client.volumes.availability("volume_example")

Nástroj příkazového řádku: apidly volumes (Reference CLI)

Příklad odpovědi (200)

{
  "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"
  }
}

Chybové stavy: 401, 403, 404, 429.

GET /volumes/{id}

Jeden svazek

Požadovaný scope: read · Oprávnění: servers.view

Parametry

Název V Typ Povinné Popis
id path string ano

Příklad požadavku (curl)

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

JavaScript (SDK)

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

Python (SDK)

client.volumes.get("volume_example")

Nástroj příkazového řádku: apidly volumes (Reference CLI)

Příklad odpovědi (200)

{
  "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"
  }
}

Chybové stavy: 401, 403, 404, 429.

PATCH /volumes/{id}

Přejmenovat svazek

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.

Požadovaný scope: full · Oprávnění: storage.manage

Parametry

Název V Typ Povinné Popis
id path string ano

Tělo požadavku

Název Typ Povinné Popis
name string ano

Příklad požadavku (curl)

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)

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

Python (SDK)

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

Nástroj příkazového řádku: apidly volumes (Reference CLI)

Příklad odpovědi (200)

{
  "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"
  }
}

Chybové stavy: 400, 401, 403, 404, 429.

DELETE /volumes/{id}

Smazat svazek (?confirm= jeho název)

The data is deleted for good.

Požadovaný scope: full · Oprávnění: storage.manage

Parametry

Název V Typ Povinné Popis
id path string ano
confirm query string ano

Příklad požadavku (curl)

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

JavaScript (SDK)

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

Python (SDK)

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

Nástroj příkazového řádku: apidly volumes (Reference CLI)

Příklad odpovědi (200)

{
  "key": null
}

Chybové stavy: 400, 401, 403, 404, 409, 429.

GET /transfers

Přenosy dat, nejnovější první

Požadovaný scope: read

Parametry

Název V Typ Povinné Popis
limit query integer ne
cursor query string ne

Příklad požadavku (curl)

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

JavaScript (SDK)

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

Python (SDK)

client.transfers.list()

Nástroj příkazového řádku: apidly transfers (Reference CLI)

Příklad odpovědi (200)

{
  "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"
}

Chybové stavy: 401, 403, 429.

POST /transfers

Kopírovat data mezi servery

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

Požadovaný scope: servers · Bezpečně opakovat s: Idempotency-Key

Příklad požadavku (curl)

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)

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

Python (SDK)

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

Nástroj příkazového řádku: apidly transfers (Reference CLI)

Příklad odpovědi (201)

{
  "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"
  }
}

Chybové stavy: 400, 401, 403, 404, 409, 429.

GET /transfers/{id}

Jeden přenos

Požadovaný scope: read

Parametry

Název V Typ Povinné Popis
id path string ano

Příklad požadavku (curl)

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

JavaScript (SDK)

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

Python (SDK)

client.transfers.get("transfer_example")

Nástroj příkazového řádku: apidly transfers (Reference CLI)

Příklad odpovědi (200)

{
  "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"
  }
}

Chybové stavy: 401, 403, 404, 429.

DELETE /transfers/{id}

Zrušit běžící přenos

Požadovaný scope: full

Parametry

Název V Typ Povinné Popis
id path string ano

Příklad požadavku (curl)

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

JavaScript (SDK)

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

Python (SDK)

client.transfers.cancel("transfer_example")

Nástroj příkazového řádku: apidly transfers (Reference CLI)

Příklad odpovědi (200)

{
  "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"
  }
}

Chybové stavy: 401, 403, 404, 409, 429.

GET /volumes/fit

Volné svazky, které může server tohoto tarifu připojit

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).

Požadovaný scope: read · Oprávnění: servers.view

Parametry

Název V Typ Povinné Popis
plan query string ano

Příklad požadavku (curl)

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

JavaScript (SDK)

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

Python (SDK)

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

Nástroj příkazového řádku: apidly volumes (Reference CLI)

Příklad odpovědi (200)

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

Chybové stavy: 400, 401, 403, 429.

Chcete to vyzkoušet?

Vytvořte si bezplatný účet a přidejte kredit, až budete chtít spustit server. Nejmenší dobití je 10 $.

Vytvořit bezplatný účet

Pomohlo vám to?

Stále si nevíte rady? Kontaktujte nás