Перейти к содержимому

POST /sandboxes/{sandboxID}/fork

Fork sandbox

Fork the sandbox: checkpoint the running sandbox in place (it is briefly paused, snapshotted with its full memory state, and resumed on its node, keeping its ID and expiration untouched) and create count new sandboxes from that snapshot. Returns one result per requested fork, each carrying either the created sandbox or the error that prevented it from starting. A non-201 status means the request failed before any fork was attempted.

Параметры

  • sandboxID · string · путь · обязательно

Тело запроса

Обязательно: нет

application/json

Схема: SandboxForkRequest

  • timeout · integer · необязательно

    Time to live for the new forked sandboxes in seconds.

    Формат: int32

    По умолчанию: 15

    Минимум: 0

  • count · integer · необязательно

    Number of forked sandboxes to create. All forks boot from the same snapshot, so the snapshot is captured once regardless of count. Each fork succeeds or fails independently; the outcome of each is reported in its entry of the response list.

    Формат: int32

    По умолчанию: 1

    Минимум: 1

    Максимум: 100

Ответы

201

The sandbox was snapshotted and the forks were attempted; each entry reports one fork's outcome

Content-Type: application/json

Схема: array<SandboxForkResult>

  • sandbox · Sandbox · необязательно

  • sandbox.templateID · string · обязательно

    Identifier of the template from which is the sandbox created

  • sandbox.sandboxID · string · обязательно

    Identifier of the sandbox

  • sandbox.alias · string · необязательно

    Alias of the template

  • sandbox.envdVersion · EnvdVersion · обязательно

    Version of the envd running in the sandbox

  • sandbox.domain · string | null · необязательно

    Base domain where the sandbox traffic is accessible

  • error · Error · необязательно

  • error.code · integer · обязательно

    Error code

    Формат: int32

  • error.message · string · обязательно

    Error

409

Conflict

Content-Type: application/json

Схема: Error

  • code · integer · обязательно

    Error code

    Формат: int32

  • message · string · обязательно

    Error

404

Not found

Content-Type: application/json

Схема: Error

  • code · integer · обязательно

    Error code

    Формат: int32

  • message · string · обязательно

    Error

401

Authentication error

Content-Type: application/json

Схема: Error

  • code · integer · обязательно

    Error code

    Формат: int32

  • message · string · обязательно

    Error

500

Server error

Content-Type: application/json

Схема: Error

  • code · integer · обязательно

    Error code

    Формат: int32

  • message · string · обязательно

    Error