Skip to main content
PUT
/
api
/
v1
/
environments
/
{id}
Replace environment
curl --request PUT \
  --url https://api.example.com/api/v1/environments/{id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --header 'If-Match: <if-match>' \
  --data '
{
  "image": {
    "docker": "<string>",
    "dockerfile": {
      "type": "inline",
      "value": "<string>"
    }
  },
  "resources": {
    "cpu": 123,
    "memory": "<string>",
    "disk": "<string>"
  },
  "network": {
    "allow": [
      "<string>"
    ]
  },
  "lifecycle": {
    "preserve": true,
    "stop_on_terminal": true,
    "auto_stop": "<string>"
  },
  "labels": {},
  "volumes": [
    {
      "id": "<string>",
      "mount_path": "<string>",
      "subpath": "<string>"
    }
  ],
  "env": {}
}
'
{
  "id": "docker",
  "revision": "0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef",
  "image": {
    "docker": "<string>",
    "dockerfile": {
      "type": "inline",
      "value": "<string>"
    }
  },
  "resources": {
    "cpu": 123,
    "memory": "<string>",
    "disk": "<string>"
  },
  "network": {
    "allow": [
      "<string>"
    ]
  },
  "lifecycle": {
    "preserve": true,
    "stop_on_terminal": true,
    "auto_stop": "<string>"
  },
  "labels": {},
  "volumes": [
    {
      "id": "<string>",
      "mount_path": "<string>",
      "subpath": "<string>"
    }
  ],
  "env": {}
}

Authorizations

Authorization
string
header
required

Raw dev token passed as Authorization: Bearer fabro_dev_... when server.auth.methods includes dev-token.

Headers

If-Match
string
required

Current resource revision used for optimistic concurrency, as returned in the ETag response header.

Path Parameters

id
string
required

Unique environment identifier.

Pattern: ^[a-z0-9][a-z0-9-]{0,62}$

Body

application/json

Request body for replacing a server-managed environment. The path id is authoritative.

provider
enum<string>
required

Desired environment provider.

Available options:
local,
docker,
daytona
image
object
required

REST-safe environment image settings. Dockerfile sources are inline-only; local paths are rejected by the REST API.

resources
object
required
network
object
required
lifecycle
object
required
labels
object
required
volumes
object[]
required
env
object
required

Response

Environment replaced

Public server-managed environment definition.

id
string
required
Pattern: ^[a-z0-9][a-z0-9-]{0,62}$
Example:

"docker"

revision
string
required

Stable revision used with If-Match for optimistic concurrency.

Pattern: ^[0-9a-f]{64}$
Example:

"0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef"

provider
enum<string>
required

Desired environment provider.

Available options:
local,
docker,
daytona
image
object
required

REST-safe environment image settings. Dockerfile sources are inline-only; local paths are rejected by the REST API.

resources
object
required
network
object
required
lifecycle
object
required
labels
object
required
volumes
object[]
required
env
object
required