Environments
Create a Revision of an Environment
Create a revision of an environment. Required permissions: ManageEnvironments, EditEnvironment, UseFileStorage. Note: This is a beta endpoint with known limitations.
POST
/
api
/
environments
/
beta
/
environments
/
{environmentId}
/
revisions
Create a Revision of an Environment
curl --request POST \
--url https://mycluster.domino.tech/api/environments/beta/environments/{environmentId}/revisions \
--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"
]
}
]
}
'import requests
url = "https://mycluster.domino.tech/api/environments/beta/environments/{environmentId}/revisions"
payload = {
"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"]
}
]
}
headers = {
"X-Domino-Api-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-Domino-Api-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
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']
}
]
})
};
fetch('https://mycluster.domino.tech/api/environments/beta/environments/{environmentId}/revisions', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://mycluster.domino.tech/api/environments/beta/environments/{environmentId}/revisions",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'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'
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-Domino-Api-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://mycluster.domino.tech/api/environments/beta/environments/{environmentId}/revisions"
payload := strings.NewReader("{\n \"dockerfileInstructions\": \"<string>\",\n \"environmentVariables\": [\n {\n \"key\": \"USERNAME\",\n \"value\": \"my_name\"\n }\n ],\n \"image\": \"<string>\",\n \"postRunScript\": \"<string>\",\n \"postSetupScript\": \"<string>\",\n \"preRunScript\": \"<string>\",\n \"preSetupScript\": \"<string>\",\n \"skipCache\": true,\n \"summary\": \"<string>\",\n \"supportedClusters\": [],\n \"tags\": [\n \"<string>\"\n ],\n \"useVpn\": true,\n \"workspaceTools\": [\n {\n \"name\": \"Jupyter\",\n \"startScripts\": [\n \"echo hello\"\n ],\n \"title\": \"Jupyter\",\n \"iconUrl\": \"/assets/images/workspace-logos/Jupyter.svg\",\n \"supportedFileExtensions\": [\n \".ipynb\"\n ]\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-Domino-Api-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://mycluster.domino.tech/api/environments/beta/environments/{environmentId}/revisions")
.header("X-Domino-Api-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"dockerfileInstructions\": \"<string>\",\n \"environmentVariables\": [\n {\n \"key\": \"USERNAME\",\n \"value\": \"my_name\"\n }\n ],\n \"image\": \"<string>\",\n \"postRunScript\": \"<string>\",\n \"postSetupScript\": \"<string>\",\n \"preRunScript\": \"<string>\",\n \"preSetupScript\": \"<string>\",\n \"skipCache\": true,\n \"summary\": \"<string>\",\n \"supportedClusters\": [],\n \"tags\": [\n \"<string>\"\n ],\n \"useVpn\": true,\n \"workspaceTools\": [\n {\n \"name\": \"Jupyter\",\n \"startScripts\": [\n \"echo hello\"\n ],\n \"title\": \"Jupyter\",\n \"iconUrl\": \"/assets/images/workspace-logos/Jupyter.svg\",\n \"supportedFileExtensions\": [\n \".ipynb\"\n ]\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://mycluster.domino.tech/api/environments/beta/environments/{environmentId}/revisions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Domino-Api-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"dockerfileInstructions\": \"<string>\",\n \"environmentVariables\": [\n {\n \"key\": \"USERNAME\",\n \"value\": \"my_name\"\n }\n ],\n \"image\": \"<string>\",\n \"postRunScript\": \"<string>\",\n \"postSetupScript\": \"<string>\",\n \"preRunScript\": \"<string>\",\n \"preSetupScript\": \"<string>\",\n \"skipCache\": true,\n \"summary\": \"<string>\",\n \"supportedClusters\": [],\n \"tags\": [\n \"<string>\"\n ],\n \"useVpn\": true,\n \"workspaceTools\": [\n {\n \"name\": \"Jupyter\",\n \"startScripts\": [\n \"echo hello\"\n ],\n \"title\": \"Jupyter\",\n \"iconUrl\": \"/assets/images/workspace-logos/Jupyter.svg\",\n \"supportedFileExtensions\": [\n \".ipynb\"\n ]\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"environmentRevision": {
"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,
"status": "queued"
},
"metadata": {
"notices": [
"<string>"
],
"requestId": "<string>"
}
}{
"error": "<string>"
}{
"code": "UNAUTHORIZED",
"message": "Authentication is required to access this resource."
}{
"code": "FORBIDDEN",
"message": "You do not have permission to perform this action."
}{
"error": "<string>"
}{
"error": "<string>"
}Authorizations
nucleus_DominoApiKeynucleus_BearerAuthentication
Path Parameters
Id of environment to create revision of
Body
application/json
Environment revision to create
Show child attributes
Show child attributes
Environment revision image. Required for creating a new environment
Type of compute cluster
Available options:
dask, mpi, ray, slurm, spark Show child attributes
Show child attributes
Last modified on August 18, 2026
Related topics
Create an environmentCreate a Domino EnvironmentUse Environment Revision Controls in DominoUpdate the restricted revision of an environmentWas this page helpful?
⌘I
Create a Revision of an Environment
curl --request POST \
--url https://mycluster.domino.tech/api/environments/beta/environments/{environmentId}/revisions \
--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"
]
}
]
}
'import requests
url = "https://mycluster.domino.tech/api/environments/beta/environments/{environmentId}/revisions"
payload = {
"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"]
}
]
}
headers = {
"X-Domino-Api-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-Domino-Api-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
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']
}
]
})
};
fetch('https://mycluster.domino.tech/api/environments/beta/environments/{environmentId}/revisions', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://mycluster.domino.tech/api/environments/beta/environments/{environmentId}/revisions",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'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'
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-Domino-Api-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://mycluster.domino.tech/api/environments/beta/environments/{environmentId}/revisions"
payload := strings.NewReader("{\n \"dockerfileInstructions\": \"<string>\",\n \"environmentVariables\": [\n {\n \"key\": \"USERNAME\",\n \"value\": \"my_name\"\n }\n ],\n \"image\": \"<string>\",\n \"postRunScript\": \"<string>\",\n \"postSetupScript\": \"<string>\",\n \"preRunScript\": \"<string>\",\n \"preSetupScript\": \"<string>\",\n \"skipCache\": true,\n \"summary\": \"<string>\",\n \"supportedClusters\": [],\n \"tags\": [\n \"<string>\"\n ],\n \"useVpn\": true,\n \"workspaceTools\": [\n {\n \"name\": \"Jupyter\",\n \"startScripts\": [\n \"echo hello\"\n ],\n \"title\": \"Jupyter\",\n \"iconUrl\": \"/assets/images/workspace-logos/Jupyter.svg\",\n \"supportedFileExtensions\": [\n \".ipynb\"\n ]\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-Domino-Api-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://mycluster.domino.tech/api/environments/beta/environments/{environmentId}/revisions")
.header("X-Domino-Api-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"dockerfileInstructions\": \"<string>\",\n \"environmentVariables\": [\n {\n \"key\": \"USERNAME\",\n \"value\": \"my_name\"\n }\n ],\n \"image\": \"<string>\",\n \"postRunScript\": \"<string>\",\n \"postSetupScript\": \"<string>\",\n \"preRunScript\": \"<string>\",\n \"preSetupScript\": \"<string>\",\n \"skipCache\": true,\n \"summary\": \"<string>\",\n \"supportedClusters\": [],\n \"tags\": [\n \"<string>\"\n ],\n \"useVpn\": true,\n \"workspaceTools\": [\n {\n \"name\": \"Jupyter\",\n \"startScripts\": [\n \"echo hello\"\n ],\n \"title\": \"Jupyter\",\n \"iconUrl\": \"/assets/images/workspace-logos/Jupyter.svg\",\n \"supportedFileExtensions\": [\n \".ipynb\"\n ]\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://mycluster.domino.tech/api/environments/beta/environments/{environmentId}/revisions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Domino-Api-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"dockerfileInstructions\": \"<string>\",\n \"environmentVariables\": [\n {\n \"key\": \"USERNAME\",\n \"value\": \"my_name\"\n }\n ],\n \"image\": \"<string>\",\n \"postRunScript\": \"<string>\",\n \"postSetupScript\": \"<string>\",\n \"preRunScript\": \"<string>\",\n \"preSetupScript\": \"<string>\",\n \"skipCache\": true,\n \"summary\": \"<string>\",\n \"supportedClusters\": [],\n \"tags\": [\n \"<string>\"\n ],\n \"useVpn\": true,\n \"workspaceTools\": [\n {\n \"name\": \"Jupyter\",\n \"startScripts\": [\n \"echo hello\"\n ],\n \"title\": \"Jupyter\",\n \"iconUrl\": \"/assets/images/workspace-logos/Jupyter.svg\",\n \"supportedFileExtensions\": [\n \".ipynb\"\n ]\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"environmentRevision": {
"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,
"status": "queued"
},
"metadata": {
"notices": [
"<string>"
],
"requestId": "<string>"
}
}{
"error": "<string>"
}{
"code": "UNAUTHORIZED",
"message": "Authentication is required to access this resource."
}{
"code": "FORBIDDEN",
"message": "You do not have permission to perform this action."
}{
"error": "<string>"
}{
"error": "<string>"
}