Skip to main content
POST
/
api
/
jobs
/
v1
/
jobs
Start a Job
curl --request POST \
  --url https://api.example.com/api/jobs/v1/jobs \
  --header 'Content-Type: application/json' \
  --header 'X-Domino-Api-Key: <api-key>' \
  --data '
{
  "projectId": "623130ad7a0af0281c01a698",
  "runCommand": "main.py",
  "capacityType": "on-demand",
  "commitId": "960a4c99a4cc38194cbacbcce41caa68ba5369ea",
  "environmentId": "623131507a0af0281c01a699",
  "environmentRevisionSpec": "ActiveRevision | LatestRevision | SomeRevision(623131577a0af0281c01a69a)",
  "externalVolumeMountIds": [
    "<string>"
  ],
  "hardwareTier": "small-k8s",
  "netAppVolumeIds": [
    "<string>"
  ],
  "snapshotDatasetsOnCompletion": true,
  "snapshotNetAppVolumesOnCompletion": true,
  "title": "K-means clustering"
}
'
{
  "job": {
    "commentsCount": 123,
    "commitDetails": {
      "inputCommitId": "f1dafe322c7d4a6720f652c330fe33b014720e46",
      "outputCommitId": "e1f06e5f64cfc26c2b70e405f70b7c8300d8a4ed"
    },
    "datasetMounts": [
      {
        "datasetName": "MyDataset",
        "id": "623137f57a0af0281c01a6a0",
        "isInput": true,
        "projectId": "6231383c7a0af0281c01a6a1",
        "containerPath": "/domino/datasets/local/quick-start",
        "snapshotId": "623138807a0af0281c01a6a2",
        "snapshotVersion": 2
      }
    ],
    "dominoStats": [
      {
        "name": "R-squared",
        "value": 0.89
      }
    ],
    "externalVolumeMounts": [
      {
        "mountPath": "/path/to/my/volume",
        "name": "MyExternalVolume",
        "readOnly": false,
        "subPath": "/mypath"
      }
    ],
    "gitRepos": [
      {
        "id": "6231365e7a0af0281c01a69f",
        "name": "MyRepo",
        "ref": "<string>",
        "uri": "git@github.com:apache/spark.git",
        "endingBranch": "final-branch",
        "endingCommitId": "dff155c9a736f9cd230eac420e3c1ef3daa0ad7e",
        "startingBranch": "init-test-branch",
        "startingCommitId": "4f2d5c2f54db4fbb16a093d4fb11fdb1fe0794c7"
      }
    ],
    "goalIds": [
      "<string>"
    ],
    "id": "<string>",
    "netAppVolumeMounts": [
      {
        "name": "MyVolume",
        "snapshotMountPath": "/path/to/my/snapshot",
        "snapshotReadOnly": false,
        "volumeMountPath": "/path/to/my/volume",
        "volumeReadOnly": false,
        "otherMounts": [
          {
            "mountPath": "/path/to/other/mount",
            "readOnly": true,
            "subPath": "/other/subPath"
          }
        ],
        "snapshotSubPath": "/my/snapshot/subPath",
        "volumeSubPath": "/my/volume/subPath"
      }
    ],
    "number": 123,
    "projects": [
      {
        "commitId": "7f8e3908f129c0ca6529028618e6f10b3d2f315a",
        "projectId": "623138c87a0af0281c01a6a3"
      }
    ],
    "runCommand": "<string>",
    "stageTimes": {
      "submissionTime": "2022-03-12T02:13:44.467Z",
      "completedTime": "2022-03-12T02:16:43.127Z",
      "startTime": "2022-03-12T02:15:44.848Z"
    },
    "status": {
      "executionStatus": "Succeeded",
      "isArchived": false,
      "isCompleted": true,
      "isScheduled": false
    },
    "tags": [
      {
        "createdAt": "2022-03-15T21:48:36.586Z",
        "creatorId": "6231342b7a0af0281c01a69e",
        "id": "623133e87a0af0281c01a69d",
        "name": "KMeansTest"
      }
    ],
    "computeCluster": {
      "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"
    },
    "queuedJobStatusDetails": {
      "expectedWait": "Now",
      "explanation": "Your run has been assigned to a machine",
      "helpText": "It will start being prepared for execution momentarily"
    },
    "runLauncherId": "<string>",
    "startedById": "<string>",
    "title": "<string>",
    "usage": {
      "cpuPercentage": 5,
      "memoryGiB": 0.73
    }
  },
  "metadata": {
    "notices": [
      "<string>"
    ],
    "requestId": "<string>"
  }
}

Authorizations

X-Domino-Api-Key
string
header
required

Body

application/json
projectId
string
required

Id of project to create job in.

Example:

"623130ad7a0af0281c01a698"

runCommand
string
required

Command for job to run

Example:

"main.py"

capacityType
string

Optional capacity type within the hardware tier.

Example:

"on-demand"

commitId
string

Git commitId to start job from. Defaults to head commitId for the project.

Example:

"960a4c99a4cc38194cbacbcce41caa68ba5369ea"

computeCluster
object
environmentId
string

Id of environment to use when creating job. Defaults to project default environment.

Example:

"623131507a0af0281c01a699"

environmentRevisionSpec
string

Specification describing which environment revision to use. Defaults to "ActiveRevision"

Example:

"ActiveRevision | LatestRevision | SomeRevision(623131577a0af0281c01a69a)"

externalVolumeMountIds
string[]

Ids of external volumes to be mounted on this job.

hardwareTier
string

Hardware tier to use for this job. Defaults to project default hardware tier.

Example:

"small-k8s"

mainRepoGitRef
object
netAppVolumeIds
string[]

Ids of NetApp volumes to be mounted on this job.

snapshotDatasetsOnCompletion
boolean

Whether to snapshot datasets mounted on the Job when the Job completes.

snapshotNetAppVolumesOnCompletion
boolean

Whether to snapshot NetApp volumes mounted on the Job when the Job completes.

title
string

Name of job to start

Example:

"K-means clustering"

Response

Success

job
object
required
metadata
object
required