Resolve the default configuration a Job would run with
Resolve the configuration a Job in this project would run with, without starting anything. Every field in the request body is optional: what you send is taken as an override, and everything you leave out is filled in from the project’s defaults. The response reports the fully resolved hardware tier, environment and revision, git ref, dataset and NetApp volume snapshots, external volumes and volume size, so a caller can show or record the exact configuration before creating a Job.
Seven fields are named exactly as POST /api/jobs/v1/jobs names them, so each resolved value can be copied straight into a start-Job request: hardwareTier, environmentId, environmentRevisionSpec, mainRepoGitRef, computeCluster, externalVolumeMountIds and netAppVolumeIds. commitId is named the same but carries over only for projects using Domino’s internal file store; see the field description on NewJobV1. The remaining fields have no counterpart on NewJobV1: datasetSnapshots, netAppVolumeSnapshots, volumeSizeGiB, resolvedMainRepoGitRef and resolvedImportedGitRepoRefs are reported for inspection, not for starting a Job. Send the individual fields rather than the whole object.
Resolution is read-only and leaves no trace on the project. Required permissions: ViewJobs
curl --request POST \
--url https://mycluster.domino.tech/api/jobs/v1/projects/{projectId}/job-defaults \
--header 'Content-Type: application/json' \
--header 'X-Domino-Api-Key: <api-key>' \
--data '
{
"commitId": "960a4c99a4cc38194cbacbcce41caa68ba5369ea",
"datasetSnapshots": [
{
"datasetId": "6231365e7a0af0281c01a69f",
"snapshotVersion": 3,
"datasetName": "training-data"
}
],
"environmentId": "623131507a0af0281c01a699",
"environmentRevisionSpec": "ActiveRevision | LatestRevision | SomeRevision(623131577a0af0281c01a69a)",
"externalVolumeMountIds": [
"6231327c7a0af0281c01a69b",
"623132867a0af0281c01a69c"
],
"hardwareTier": "small-k8s",
"importedGitRepoOverrides": [
{
"id": "6231365e7a0af0281c01a69f",
"ref": {
"refType": "head | commitId | tags | branches",
"value": "my-test-branch"
},
"resolvedCommitId": "dff155c9a736f9cd230eac420e3c1ef3daa0ad7e"
}
],
"netAppVolumeIds": [
"31c4a22a-5571-4e9b-b7ac-921d241acd00"
],
"netAppVolumeSnapshots": [
{
"volumeId": "31c4a22a-5571-4e9b-b7ac-921d241acd00",
"snapshotVersion": 2,
"volumeName": "shared-scratch"
}
],
"volumeSizeGiB": 10
}
'import requests
url = "https://mycluster.domino.tech/api/jobs/v1/projects/{projectId}/job-defaults"
payload = {
"commitId": "960a4c99a4cc38194cbacbcce41caa68ba5369ea",
"datasetSnapshots": [
{
"datasetId": "6231365e7a0af0281c01a69f",
"snapshotVersion": 3,
"datasetName": "training-data"
}
],
"environmentId": "623131507a0af0281c01a699",
"environmentRevisionSpec": "ActiveRevision | LatestRevision | SomeRevision(623131577a0af0281c01a69a)",
"externalVolumeMountIds": ["6231327c7a0af0281c01a69b", "623132867a0af0281c01a69c"],
"hardwareTier": "small-k8s",
"importedGitRepoOverrides": [
{
"id": "6231365e7a0af0281c01a69f",
"ref": {
"refType": "head | commitId | tags | branches",
"value": "my-test-branch"
},
"resolvedCommitId": "dff155c9a736f9cd230eac420e3c1ef3daa0ad7e"
}
],
"netAppVolumeIds": ["31c4a22a-5571-4e9b-b7ac-921d241acd00"],
"netAppVolumeSnapshots": [
{
"volumeId": "31c4a22a-5571-4e9b-b7ac-921d241acd00",
"snapshotVersion": 2,
"volumeName": "shared-scratch"
}
],
"volumeSizeGiB": 10
}
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({
commitId: '960a4c99a4cc38194cbacbcce41caa68ba5369ea',
datasetSnapshots: [
{
datasetId: '6231365e7a0af0281c01a69f',
snapshotVersion: 3,
datasetName: 'training-data'
}
],
environmentId: '623131507a0af0281c01a699',
environmentRevisionSpec: 'ActiveRevision | LatestRevision | SomeRevision(623131577a0af0281c01a69a)',
externalVolumeMountIds: ['6231327c7a0af0281c01a69b', '623132867a0af0281c01a69c'],
hardwareTier: 'small-k8s',
importedGitRepoOverrides: [
{
id: '6231365e7a0af0281c01a69f',
ref: {refType: 'head | commitId | tags | branches', value: 'my-test-branch'},
resolvedCommitId: 'dff155c9a736f9cd230eac420e3c1ef3daa0ad7e'
}
],
netAppVolumeIds: ['31c4a22a-5571-4e9b-b7ac-921d241acd00'],
netAppVolumeSnapshots: [
{
volumeId: '31c4a22a-5571-4e9b-b7ac-921d241acd00',
snapshotVersion: 2,
volumeName: 'shared-scratch'
}
],
volumeSizeGiB: 10
})
};
fetch('https://mycluster.domino.tech/api/jobs/v1/projects/{projectId}/job-defaults', 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/jobs/v1/projects/{projectId}/job-defaults",
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([
'commitId' => '960a4c99a4cc38194cbacbcce41caa68ba5369ea',
'datasetSnapshots' => [
[
'datasetId' => '6231365e7a0af0281c01a69f',
'snapshotVersion' => 3,
'datasetName' => 'training-data'
]
],
'environmentId' => '623131507a0af0281c01a699',
'environmentRevisionSpec' => 'ActiveRevision | LatestRevision | SomeRevision(623131577a0af0281c01a69a)',
'externalVolumeMountIds' => [
'6231327c7a0af0281c01a69b',
'623132867a0af0281c01a69c'
],
'hardwareTier' => 'small-k8s',
'importedGitRepoOverrides' => [
[
'id' => '6231365e7a0af0281c01a69f',
'ref' => [
'refType' => 'head | commitId | tags | branches',
'value' => 'my-test-branch'
],
'resolvedCommitId' => 'dff155c9a736f9cd230eac420e3c1ef3daa0ad7e'
]
],
'netAppVolumeIds' => [
'31c4a22a-5571-4e9b-b7ac-921d241acd00'
],
'netAppVolumeSnapshots' => [
[
'volumeId' => '31c4a22a-5571-4e9b-b7ac-921d241acd00',
'snapshotVersion' => 2,
'volumeName' => 'shared-scratch'
]
],
'volumeSizeGiB' => 10
]),
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/jobs/v1/projects/{projectId}/job-defaults"
payload := strings.NewReader("{\n \"commitId\": \"960a4c99a4cc38194cbacbcce41caa68ba5369ea\",\n \"datasetSnapshots\": [\n {\n \"datasetId\": \"6231365e7a0af0281c01a69f\",\n \"snapshotVersion\": 3,\n \"datasetName\": \"training-data\"\n }\n ],\n \"environmentId\": \"623131507a0af0281c01a699\",\n \"environmentRevisionSpec\": \"ActiveRevision | LatestRevision | SomeRevision(623131577a0af0281c01a69a)\",\n \"externalVolumeMountIds\": [\n \"6231327c7a0af0281c01a69b\",\n \"623132867a0af0281c01a69c\"\n ],\n \"hardwareTier\": \"small-k8s\",\n \"importedGitRepoOverrides\": [\n {\n \"id\": \"6231365e7a0af0281c01a69f\",\n \"ref\": {\n \"refType\": \"head | commitId | tags | branches\",\n \"value\": \"my-test-branch\"\n },\n \"resolvedCommitId\": \"dff155c9a736f9cd230eac420e3c1ef3daa0ad7e\"\n }\n ],\n \"netAppVolumeIds\": [\n \"31c4a22a-5571-4e9b-b7ac-921d241acd00\"\n ],\n \"netAppVolumeSnapshots\": [\n {\n \"volumeId\": \"31c4a22a-5571-4e9b-b7ac-921d241acd00\",\n \"snapshotVersion\": 2,\n \"volumeName\": \"shared-scratch\"\n }\n ],\n \"volumeSizeGiB\": 10\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/jobs/v1/projects/{projectId}/job-defaults")
.header("X-Domino-Api-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"commitId\": \"960a4c99a4cc38194cbacbcce41caa68ba5369ea\",\n \"datasetSnapshots\": [\n {\n \"datasetId\": \"6231365e7a0af0281c01a69f\",\n \"snapshotVersion\": 3,\n \"datasetName\": \"training-data\"\n }\n ],\n \"environmentId\": \"623131507a0af0281c01a699\",\n \"environmentRevisionSpec\": \"ActiveRevision | LatestRevision | SomeRevision(623131577a0af0281c01a69a)\",\n \"externalVolumeMountIds\": [\n \"6231327c7a0af0281c01a69b\",\n \"623132867a0af0281c01a69c\"\n ],\n \"hardwareTier\": \"small-k8s\",\n \"importedGitRepoOverrides\": [\n {\n \"id\": \"6231365e7a0af0281c01a69f\",\n \"ref\": {\n \"refType\": \"head | commitId | tags | branches\",\n \"value\": \"my-test-branch\"\n },\n \"resolvedCommitId\": \"dff155c9a736f9cd230eac420e3c1ef3daa0ad7e\"\n }\n ],\n \"netAppVolumeIds\": [\n \"31c4a22a-5571-4e9b-b7ac-921d241acd00\"\n ],\n \"netAppVolumeSnapshots\": [\n {\n \"volumeId\": \"31c4a22a-5571-4e9b-b7ac-921d241acd00\",\n \"snapshotVersion\": 2,\n \"volumeName\": \"shared-scratch\"\n }\n ],\n \"volumeSizeGiB\": 10\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://mycluster.domino.tech/api/jobs/v1/projects/{projectId}/job-defaults")
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 \"commitId\": \"960a4c99a4cc38194cbacbcce41caa68ba5369ea\",\n \"datasetSnapshots\": [\n {\n \"datasetId\": \"6231365e7a0af0281c01a69f\",\n \"snapshotVersion\": 3,\n \"datasetName\": \"training-data\"\n }\n ],\n \"environmentId\": \"623131507a0af0281c01a699\",\n \"environmentRevisionSpec\": \"ActiveRevision | LatestRevision | SomeRevision(623131577a0af0281c01a69a)\",\n \"externalVolumeMountIds\": [\n \"6231327c7a0af0281c01a69b\",\n \"623132867a0af0281c01a69c\"\n ],\n \"hardwareTier\": \"small-k8s\",\n \"importedGitRepoOverrides\": [\n {\n \"id\": \"6231365e7a0af0281c01a69f\",\n \"ref\": {\n \"refType\": \"head | commitId | tags | branches\",\n \"value\": \"my-test-branch\"\n },\n \"resolvedCommitId\": \"dff155c9a736f9cd230eac420e3c1ef3daa0ad7e\"\n }\n ],\n \"netAppVolumeIds\": [\n \"31c4a22a-5571-4e9b-b7ac-921d241acd00\"\n ],\n \"netAppVolumeSnapshots\": [\n {\n \"volumeId\": \"31c4a22a-5571-4e9b-b7ac-921d241acd00\",\n \"snapshotVersion\": 2,\n \"volumeName\": \"shared-scratch\"\n }\n ],\n \"volumeSizeGiB\": 10\n}"
response = http.request(request)
puts response.read_body{
"jobDefaults": {
"commitId": "960a4c99a4cc38194cbacbcce41caa68ba5369ea",
"datasetSnapshots": [
{
"datasetId": "6231365e7a0af0281c01a69f",
"snapshotVersion": 3,
"datasetName": "training-data"
}
],
"environmentId": "623131507a0af0281c01a699",
"environmentRevisionSpec": "ActiveRevision | LatestRevision | SomeRevision(623131577a0af0281c01a69a)",
"externalVolumeMountIds": [
"<string>"
],
"hardwareTier": "small-k8s",
"netAppVolumeIds": [
"<string>"
],
"netAppVolumeSnapshots": [
{
"volumeId": "31c4a22a-5571-4e9b-b7ac-921d241acd00",
"snapshotVersion": 2,
"volumeName": "shared-scratch"
}
],
"volumeSizeGiB": 10,
"computeCluster": {
"clusterType": "dask",
"computeEnvironmentId": "623139857a0af0281c01a6a4",
"workerCount": 4,
"workerHardwareTier": "large-k8s",
"computeEnvironmentRevisionSpec": "ActiveRevision | LatestRevision | SomeRevision(623131577a0af0281c01a69a)",
"masterHardwareTierId": "medium-k8s",
"maxWorkerCount": 10,
"workerStorageMB": 5
},
"mainRepoGitRef": {
"refType": "head | commitId | tags | branches",
"value": "my-test-branch"
},
"resolvedImportedGitRepoRefs": {
"6231365e7a0af0281c01a69f": "dff155c9a736f9cd230eac420e3c1ef3daa0ad7e"
},
"resolvedMainRepoGitRef": "4f2d5c2f54db4fbb16a093d4fb11fdb1fe0794c7"
},
"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
Path Parameters
ID of the project to resolve Job defaults for
Body
Overrides to apply before resolving the remaining values from the project's defaults. Send an empty object to resolve every value from the project.
Overrides to apply before resolving. Every field is optional; anything left out is resolved from the project's defaults. Fields shared with POST /api/jobs/v1/jobs use the names that endpoint uses; datasetSnapshots, netAppVolumeSnapshots, volumeSizeGiB and importedGitRepoOverrides have no counterpart there.
Commit to resolve against. Applies only to the project's internal DFS commit history; use mainRepoGitRef for a git-based project's main repository.
"960a4c99a4cc38194cbacbcce41caa68ba5369ea"
Show child attributes
Show child attributes
Dataset snapshots to resolve against. Defaults to the snapshots the project mounts.
Show child attributes
Show child attributes
Id of the environment to resolve against. Defaults to the project's default environment.
"623131507a0af0281c01a699"
Specification describing which environment revision to use. Defaults to "ActiveRevision"
"ActiveRevision | LatestRevision | SomeRevision(623131577a0af0281c01a69a)"
Ids of external volumes to resolve against. Defaults to the volumes the project mounts.
[
"6231327c7a0af0281c01a69b",
"623132867a0af0281c01a69c"
]
Hardware tier to resolve against. Defaults to the project's default hardware tier.
"small-k8s"
Per-imported-repository git refs to resolve against. Defaults to each repository's default ref.
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Ids of NetApp volumes to resolve against. Defaults to the volumes the project mounts.
["31c4a22a-5571-4e9b-b7ac-921d241acd00"]
NetApp volume snapshots to resolve against. Defaults to the snapshots the project mounts.
Show child attributes
Show child attributes
Volume size in GiB to resolve against. Defaults to the project's configured size.
10
Response
Success
The fully resolved configuration a Job would run with. Fields shared with the request body of POST /api/jobs/v1/jobs use the names that endpoint uses, so each shared value can be copied into a start-Job request; the object as a whole is not a start-Job body. resolvedMainRepoGitRef, resolvedImportedGitRepoRefs, datasetSnapshots, netAppVolumeSnapshots and volumeSizeGiB are reported for inspection and have no counterpart on NewJobV1.
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Was this page helpful?
curl --request POST \
--url https://mycluster.domino.tech/api/jobs/v1/projects/{projectId}/job-defaults \
--header 'Content-Type: application/json' \
--header 'X-Domino-Api-Key: <api-key>' \
--data '
{
"commitId": "960a4c99a4cc38194cbacbcce41caa68ba5369ea",
"datasetSnapshots": [
{
"datasetId": "6231365e7a0af0281c01a69f",
"snapshotVersion": 3,
"datasetName": "training-data"
}
],
"environmentId": "623131507a0af0281c01a699",
"environmentRevisionSpec": "ActiveRevision | LatestRevision | SomeRevision(623131577a0af0281c01a69a)",
"externalVolumeMountIds": [
"6231327c7a0af0281c01a69b",
"623132867a0af0281c01a69c"
],
"hardwareTier": "small-k8s",
"importedGitRepoOverrides": [
{
"id": "6231365e7a0af0281c01a69f",
"ref": {
"refType": "head | commitId | tags | branches",
"value": "my-test-branch"
},
"resolvedCommitId": "dff155c9a736f9cd230eac420e3c1ef3daa0ad7e"
}
],
"netAppVolumeIds": [
"31c4a22a-5571-4e9b-b7ac-921d241acd00"
],
"netAppVolumeSnapshots": [
{
"volumeId": "31c4a22a-5571-4e9b-b7ac-921d241acd00",
"snapshotVersion": 2,
"volumeName": "shared-scratch"
}
],
"volumeSizeGiB": 10
}
'import requests
url = "https://mycluster.domino.tech/api/jobs/v1/projects/{projectId}/job-defaults"
payload = {
"commitId": "960a4c99a4cc38194cbacbcce41caa68ba5369ea",
"datasetSnapshots": [
{
"datasetId": "6231365e7a0af0281c01a69f",
"snapshotVersion": 3,
"datasetName": "training-data"
}
],
"environmentId": "623131507a0af0281c01a699",
"environmentRevisionSpec": "ActiveRevision | LatestRevision | SomeRevision(623131577a0af0281c01a69a)",
"externalVolumeMountIds": ["6231327c7a0af0281c01a69b", "623132867a0af0281c01a69c"],
"hardwareTier": "small-k8s",
"importedGitRepoOverrides": [
{
"id": "6231365e7a0af0281c01a69f",
"ref": {
"refType": "head | commitId | tags | branches",
"value": "my-test-branch"
},
"resolvedCommitId": "dff155c9a736f9cd230eac420e3c1ef3daa0ad7e"
}
],
"netAppVolumeIds": ["31c4a22a-5571-4e9b-b7ac-921d241acd00"],
"netAppVolumeSnapshots": [
{
"volumeId": "31c4a22a-5571-4e9b-b7ac-921d241acd00",
"snapshotVersion": 2,
"volumeName": "shared-scratch"
}
],
"volumeSizeGiB": 10
}
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({
commitId: '960a4c99a4cc38194cbacbcce41caa68ba5369ea',
datasetSnapshots: [
{
datasetId: '6231365e7a0af0281c01a69f',
snapshotVersion: 3,
datasetName: 'training-data'
}
],
environmentId: '623131507a0af0281c01a699',
environmentRevisionSpec: 'ActiveRevision | LatestRevision | SomeRevision(623131577a0af0281c01a69a)',
externalVolumeMountIds: ['6231327c7a0af0281c01a69b', '623132867a0af0281c01a69c'],
hardwareTier: 'small-k8s',
importedGitRepoOverrides: [
{
id: '6231365e7a0af0281c01a69f',
ref: {refType: 'head | commitId | tags | branches', value: 'my-test-branch'},
resolvedCommitId: 'dff155c9a736f9cd230eac420e3c1ef3daa0ad7e'
}
],
netAppVolumeIds: ['31c4a22a-5571-4e9b-b7ac-921d241acd00'],
netAppVolumeSnapshots: [
{
volumeId: '31c4a22a-5571-4e9b-b7ac-921d241acd00',
snapshotVersion: 2,
volumeName: 'shared-scratch'
}
],
volumeSizeGiB: 10
})
};
fetch('https://mycluster.domino.tech/api/jobs/v1/projects/{projectId}/job-defaults', 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/jobs/v1/projects/{projectId}/job-defaults",
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([
'commitId' => '960a4c99a4cc38194cbacbcce41caa68ba5369ea',
'datasetSnapshots' => [
[
'datasetId' => '6231365e7a0af0281c01a69f',
'snapshotVersion' => 3,
'datasetName' => 'training-data'
]
],
'environmentId' => '623131507a0af0281c01a699',
'environmentRevisionSpec' => 'ActiveRevision | LatestRevision | SomeRevision(623131577a0af0281c01a69a)',
'externalVolumeMountIds' => [
'6231327c7a0af0281c01a69b',
'623132867a0af0281c01a69c'
],
'hardwareTier' => 'small-k8s',
'importedGitRepoOverrides' => [
[
'id' => '6231365e7a0af0281c01a69f',
'ref' => [
'refType' => 'head | commitId | tags | branches',
'value' => 'my-test-branch'
],
'resolvedCommitId' => 'dff155c9a736f9cd230eac420e3c1ef3daa0ad7e'
]
],
'netAppVolumeIds' => [
'31c4a22a-5571-4e9b-b7ac-921d241acd00'
],
'netAppVolumeSnapshots' => [
[
'volumeId' => '31c4a22a-5571-4e9b-b7ac-921d241acd00',
'snapshotVersion' => 2,
'volumeName' => 'shared-scratch'
]
],
'volumeSizeGiB' => 10
]),
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/jobs/v1/projects/{projectId}/job-defaults"
payload := strings.NewReader("{\n \"commitId\": \"960a4c99a4cc38194cbacbcce41caa68ba5369ea\",\n \"datasetSnapshots\": [\n {\n \"datasetId\": \"6231365e7a0af0281c01a69f\",\n \"snapshotVersion\": 3,\n \"datasetName\": \"training-data\"\n }\n ],\n \"environmentId\": \"623131507a0af0281c01a699\",\n \"environmentRevisionSpec\": \"ActiveRevision | LatestRevision | SomeRevision(623131577a0af0281c01a69a)\",\n \"externalVolumeMountIds\": [\n \"6231327c7a0af0281c01a69b\",\n \"623132867a0af0281c01a69c\"\n ],\n \"hardwareTier\": \"small-k8s\",\n \"importedGitRepoOverrides\": [\n {\n \"id\": \"6231365e7a0af0281c01a69f\",\n \"ref\": {\n \"refType\": \"head | commitId | tags | branches\",\n \"value\": \"my-test-branch\"\n },\n \"resolvedCommitId\": \"dff155c9a736f9cd230eac420e3c1ef3daa0ad7e\"\n }\n ],\n \"netAppVolumeIds\": [\n \"31c4a22a-5571-4e9b-b7ac-921d241acd00\"\n ],\n \"netAppVolumeSnapshots\": [\n {\n \"volumeId\": \"31c4a22a-5571-4e9b-b7ac-921d241acd00\",\n \"snapshotVersion\": 2,\n \"volumeName\": \"shared-scratch\"\n }\n ],\n \"volumeSizeGiB\": 10\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/jobs/v1/projects/{projectId}/job-defaults")
.header("X-Domino-Api-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"commitId\": \"960a4c99a4cc38194cbacbcce41caa68ba5369ea\",\n \"datasetSnapshots\": [\n {\n \"datasetId\": \"6231365e7a0af0281c01a69f\",\n \"snapshotVersion\": 3,\n \"datasetName\": \"training-data\"\n }\n ],\n \"environmentId\": \"623131507a0af0281c01a699\",\n \"environmentRevisionSpec\": \"ActiveRevision | LatestRevision | SomeRevision(623131577a0af0281c01a69a)\",\n \"externalVolumeMountIds\": [\n \"6231327c7a0af0281c01a69b\",\n \"623132867a0af0281c01a69c\"\n ],\n \"hardwareTier\": \"small-k8s\",\n \"importedGitRepoOverrides\": [\n {\n \"id\": \"6231365e7a0af0281c01a69f\",\n \"ref\": {\n \"refType\": \"head | commitId | tags | branches\",\n \"value\": \"my-test-branch\"\n },\n \"resolvedCommitId\": \"dff155c9a736f9cd230eac420e3c1ef3daa0ad7e\"\n }\n ],\n \"netAppVolumeIds\": [\n \"31c4a22a-5571-4e9b-b7ac-921d241acd00\"\n ],\n \"netAppVolumeSnapshots\": [\n {\n \"volumeId\": \"31c4a22a-5571-4e9b-b7ac-921d241acd00\",\n \"snapshotVersion\": 2,\n \"volumeName\": \"shared-scratch\"\n }\n ],\n \"volumeSizeGiB\": 10\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://mycluster.domino.tech/api/jobs/v1/projects/{projectId}/job-defaults")
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 \"commitId\": \"960a4c99a4cc38194cbacbcce41caa68ba5369ea\",\n \"datasetSnapshots\": [\n {\n \"datasetId\": \"6231365e7a0af0281c01a69f\",\n \"snapshotVersion\": 3,\n \"datasetName\": \"training-data\"\n }\n ],\n \"environmentId\": \"623131507a0af0281c01a699\",\n \"environmentRevisionSpec\": \"ActiveRevision | LatestRevision | SomeRevision(623131577a0af0281c01a69a)\",\n \"externalVolumeMountIds\": [\n \"6231327c7a0af0281c01a69b\",\n \"623132867a0af0281c01a69c\"\n ],\n \"hardwareTier\": \"small-k8s\",\n \"importedGitRepoOverrides\": [\n {\n \"id\": \"6231365e7a0af0281c01a69f\",\n \"ref\": {\n \"refType\": \"head | commitId | tags | branches\",\n \"value\": \"my-test-branch\"\n },\n \"resolvedCommitId\": \"dff155c9a736f9cd230eac420e3c1ef3daa0ad7e\"\n }\n ],\n \"netAppVolumeIds\": [\n \"31c4a22a-5571-4e9b-b7ac-921d241acd00\"\n ],\n \"netAppVolumeSnapshots\": [\n {\n \"volumeId\": \"31c4a22a-5571-4e9b-b7ac-921d241acd00\",\n \"snapshotVersion\": 2,\n \"volumeName\": \"shared-scratch\"\n }\n ],\n \"volumeSizeGiB\": 10\n}"
response = http.request(request)
puts response.read_body{
"jobDefaults": {
"commitId": "960a4c99a4cc38194cbacbcce41caa68ba5369ea",
"datasetSnapshots": [
{
"datasetId": "6231365e7a0af0281c01a69f",
"snapshotVersion": 3,
"datasetName": "training-data"
}
],
"environmentId": "623131507a0af0281c01a699",
"environmentRevisionSpec": "ActiveRevision | LatestRevision | SomeRevision(623131577a0af0281c01a69a)",
"externalVolumeMountIds": [
"<string>"
],
"hardwareTier": "small-k8s",
"netAppVolumeIds": [
"<string>"
],
"netAppVolumeSnapshots": [
{
"volumeId": "31c4a22a-5571-4e9b-b7ac-921d241acd00",
"snapshotVersion": 2,
"volumeName": "shared-scratch"
}
],
"volumeSizeGiB": 10,
"computeCluster": {
"clusterType": "dask",
"computeEnvironmentId": "623139857a0af0281c01a6a4",
"workerCount": 4,
"workerHardwareTier": "large-k8s",
"computeEnvironmentRevisionSpec": "ActiveRevision | LatestRevision | SomeRevision(623131577a0af0281c01a69a)",
"masterHardwareTierId": "medium-k8s",
"maxWorkerCount": 10,
"workerStorageMB": 5
},
"mainRepoGitRef": {
"refType": "head | commitId | tags | branches",
"value": "my-test-branch"
},
"resolvedImportedGitRepoRefs": {
"6231365e7a0af0281c01a69f": "dff155c9a736f9cd230eac420e3c1ef3daa0ad7e"
},
"resolvedMainRepoGitRef": "4f2d5c2f54db4fbb16a093d4fb11fdb1fe0794c7"
},
"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>"
}