Machines

Change a project's editor machine type, sandbox environment or idle shutdown

Changed on

Changes the machine type, sandbox environment or idle shutdown of the project machine. A new idle shutdown applies right away; a stopped machine picks up the other changes on its next start. A running machine needs restart: true, otherwise the request returns 409 and changes nothing. If the restarted machine cannot start, the request returns 409 but keeps the change. A custom machine type only runs in its own sandbox environment, so moving off it needs a new type. To run a single detached run or session on another machine type, pass machineType when creating it.

patch/projects/{projectId}/machine

Request

  • Base URL
    https://api.deepnote.com/v2
  • URL
    https://api.deepnote.com/v2/projects/{projectId}/machine
  • Auth
    HTTP bearer

Path parameters

projectIdstring uuid required

ID of the project whose machine to use.

Request body

typestring

Machine type for the project, as an id from GET /machine-types.

idleShutdownSecondsinteger

How long the machine keeps running without activity before it shuts down, in seconds, up to 24 hours.

sandboxEnvironmentIdstring

Sandbox environment to run the project in, as an id from GET /machine-types.

restartboolean

Restart a running machine so the change takes effect. Kernel state, such as variables, is lost.

Example request

{
  "type": "fjord",
  "idleShutdownSeconds": 3600,
  "sandboxEnvironmentId": "deepnote"
}

Response

Updated project machine

Example response

{
  "machine": {
    "status": "running",
    "startingPhase": "pulling_image",
    "type": {
      "id": "fjord",
      "name": "CPU (Plus)",
      "type": "deepnote",
      "vCpus": 4,
      "memoryGiB": 16
    },
    "sandboxEnvironmentId": "deepnote",
    "idleShutdownSeconds": 900
  }
}

Changes

    • breaking

      the response property / became nullable for the status

    • breaking

      the response property / became nullable for the status

    • info

      response property machine/error list-of-types was narrowed by removing types null from media type application/json of response 200

    • info

      response property machine/sandboxEnvironmentId list-of-types was narrowed by removing types null from media type application/json of response 200

    • info

      added the required property / to the response with the status