Skip to main content
POST
/
api
/
environments
/
beta
/
environments
Create an environment
curl --request POST \
  --url https://api.example.com/api/environments/beta/environments \
  --header 'Content-Type: application/json' \
  --header 'X-Domino-Api-Key: <api-key>' \
  --data '
{
  "dockerfileInstructions": "<string>",
  "environmentVariables": [
    {
      "key": "USERNAME",
      "value": "my_name"
    }
  ],
  "image": "<string>",
  "postRunScript": "<string>",
  "postSetupScript": "<string>",
  "preRunScript": "<string>",
  "preSetupScript": "<string>",
  "skipCache": true,
  "summary": "<string>",
  "supportedClusters": [],
  "tags": [
    "<string>"
  ],
  "useVpn": true,
  "workspaceTools": [
    {
      "name": "Jupyter",
      "startScripts": [
        "echo hello"
      ],
      "title": "Jupyter",
      "iconUrl": "/assets/images/workspace-logos/Jupyter.svg",
      "supportedFileExtensions": [
        ".ipynb"
      ]
    }
  ],
  "addBaseDependencies": true,
  "description": "<string>",
  "duplicateFromEnvironmentId": "<string>",
  "isCurated": true,
  "isRestricted": true,
  "name": "<string>",
  "orgOwnerId": "<string>"
}
'
{
  "environment": {
    "archived": false,
    "id": "623132867a0af0281c01a69c",
    "name": "MyOrg",
    "supportedClusters": [],
    "activeRevisionTags": [
      "<string>"
    ],
    "internalTags": [
      "<string>"
    ],
    "isCurated": true,
    "latestRevision": {
      "availableTools": [
        {
          "name": "Jupyter",
          "startScripts": [
            "echo hello"
          ],
          "title": "Jupyter",
          "iconUrl": "/assets/images/workspace-logos/Jupyter.svg",
          "proxyConfig": {
            "internalPath": "/{{ownerUsername}}/{{projectName}}/{{sessionPathComponent}}/{{runId}}/{{#if pathToOpen}}tree/{{pathToOpen}}{{/if}}",
            "port": 8888,
            "requireSubdomain": false,
            "rewrite": false
          },
          "supportedFileExtensions": [
            ".ipynb"
          ]
        }
      ],
      "id": "62313cfd7a0af0281c01a6a6",
      "number": 4
    },
    "owner": {
      "id": "6231327c7a0af0281c01a69b",
      "username": "OrgOwner"
    },
    "restrictedRevision": {
      "availableTools": [
        {
          "name": "Jupyter",
          "startScripts": [
            "echo hello"
          ],
          "title": "Jupyter",
          "iconUrl": "/assets/images/workspace-logos/Jupyter.svg",
          "proxyConfig": {
            "internalPath": "/{{ownerUsername}}/{{projectName}}/{{sessionPathComponent}}/{{runId}}/{{#if pathToOpen}}tree/{{pathToOpen}}{{/if}}",
            "port": 8888,
            "requireSubdomain": false,
            "rewrite": false
          },
          "supportedFileExtensions": [
            ".ipynb"
          ]
        }
      ],
      "id": "62313cfd7a0af0281c01a6a6",
      "number": 4
    },
    "selectedRevision": {
      "availableTools": [
        {
          "name": "Jupyter",
          "startScripts": [
            "echo hello"
          ],
          "title": "Jupyter",
          "iconUrl": "/assets/images/workspace-logos/Jupyter.svg",
          "proxyConfig": {
            "internalPath": "/{{ownerUsername}}/{{projectName}}/{{sessionPathComponent}}/{{runId}}/{{#if pathToOpen}}tree/{{pathToOpen}}{{/if}}",
            "port": 8888,
            "requireSubdomain": false,
            "rewrite": false
          },
          "supportedFileExtensions": [
            ".ipynb"
          ]
        }
      ],
      "id": "62313cfd7a0af0281c01a6a6",
      "number": 4
    }
  },
  "metadata": {
    "notices": [
      "<string>"
    ],
    "requestId": "<string>"
  }
}

Authorizations

X-Domino-Api-Key
string
header
required

Body

application/json

Environment to create

dockerfileInstructions
string
environmentVariables
object[]
image
string

Environment revision image. Required for creating a new environment

postRunScript
string
postSetupScript
string
preRunScript
string
preSetupScript
string
skipCache
boolean
summary
string
supportedClusters
enum<string>[]

Type of compute cluster

Available options:
dask,
mpi,
ray,
spark
tags
string[]
useVpn
boolean
workspaceTools
object[]
addBaseDependencies
boolean

Required for creating a new environment

description
string
duplicateFromEnvironmentId
string

The id of the environment to duplicate. When specifying this property, no other properties in the payload must be set.

isCurated
boolean
isRestricted
boolean

Specifies if an environment is restricted. Only users with ClassifyEnvironments permission can set this to true

name
string

Environment name. Required for creating a new environment

orgOwnerId
string

Sets an Organization as the Environment owner. Only used if visibility is 'Private', as 'Global' environments don't have owners.

rebuildOnBaseChanges
enum<string>

Whether to build a new revision when the base environment changes.

Available options:
never,
followActive
visibility
enum<string>

Environment visibility. Required for creating a new environment

Available options:
global,
private

Response

Success

environment
object
required
metadata
object
required