Environments

Replace environment

Changed on

Replaces an environment definition when If-Match matches the current environment revision. The path id is authoritative; the request body omits id.

put/api/v1/environments/{id}

Request

  • The document declares no server URL.
  • Auth
    • HTTP bearer
    • or API key in cookie __fabro_session

Path parameters

idstring required

Unique environment identifier.

Headers

If-Matchstring required

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

Request body

providerstring required

Sandbox provider kind. local, docker, and daytona are bundled with the server; any other value names a sandbox-driver plugin configured under server.sandbox.providers.<kind>.

cwdstring nullable

Local-provider command working directory for this environment. Docker and Daytona ignore this value.

labelsStringMap required
envobject required

Example request

{
  "provider": "docker",
  "cwd": "/srv/fabro/workspaces/team-a"
}

Response

Environment replaced

idstring required
revisionstring required

Stable revision used with If-Match for optimistic concurrency.

providerstring required

Sandbox provider kind. local, docker, and daytona are bundled with the server; any other value names a sandbox-driver plugin configured under server.sandbox.providers.<kind>.

cwdstring nullable

Local-provider command working directory for this environment. Docker and Daytona ignore this value.

labelsStringMap required
envobject required

Example response

{
  "id": "docker",
  "revision": "0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef",
  "provider": "docker",
  "cwd": "/srv/fabro/workspaces/team-a"
}

Changes

    • info

      added the optional property // to the response with the status

    • info

      added the optional property // to the response with the status

    • info

      added the optional property // to the response with the status

    • info

      added the optional property // to the response with the status

    • info

      added the optional property // to the response with the status

    • info

      added the optional property // to the response with the status

    • breaking

      removed the enum value daytona of the request property

    • breaking

      removed the enum value docker of the request property

    • breaking

      removed the enum value local of the request property

    • breaking

      added the pattern ^[a-z0-9]([a-z0-9-]{0,62}[a-z0-9])?$ to the request property

    • info

      removed the daytona enum value from the response property for the response status

    • info

      removed the docker enum value from the response property for the response status

    • info

      removed the local enum value from the response property for the response status

    • info

      the response's property pattern ^[a-z0-9]([a-z0-9-]{0,62}[a-z0-9])?$ was added for the status