> ## Documentation Index
> Fetch the complete documentation index at: https://docs.domino.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Start a Job

> Start a new Job. Required permissions: `StartJob, UseGlobalCompute`



## OpenAPI

````yaml /api-specs/cloud/public-api.yaml post /api/jobs/v1/jobs
openapi: 3.0.3
info:
  title: Domino Public API
  description: Domino Public API Endpoints
  version: cloud
servers: []
security:
  - DominoApiKey: []
  - BearerAuthentication: []
tags:
  - name: AIGateway
  - name: AppInstances
  - name: AppVersions
  - name: Apps
  - name: AsyncPredictions
  - name: AuditTrail
  - name: BillingTag
  - name: BillingTagSettings
  - name: Cost
  - name: CustomMetrics
  - name: DataSource
  - name: DatasetRw
  - name: DeploymentTargets
  - name: Environments
  - name: Extensions
  - name: GenAI
  - name: HardwareTier
  - name: Jobs
  - name: ModelAPI
  - name: ModelAPIVersion
  - name: ModelDeployment
  - name: Organizations
  - name: PPM
  - name: PersonalAccessToken
  - name: ProjectSharedDatasets
  - name: ProjectTemplates
  - name: Projects
  - name: ProjectsCommits
  - name: ProjectsFiles
  - name: RegisteredModels
  - name: ServiceAccounts
  - name: Users
  - name: Workspaces
paths:
  /api/jobs/v1/jobs:
    post:
      tags:
        - Jobs
      summary: Start a Job
      description: 'Start a new Job. Required permissions: `StartJob, UseGlobalCompute`'
      operationId: startJob
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/NewJobV1'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JobEnvelopeV1'
          description: Success
        '400':
          $ref: '#/components/responses/400'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
        '404':
          $ref: '#/components/responses/404'
        '500':
          $ref: '#/components/responses/500'
components:
  schemas:
    NewJobV1:
      properties:
        capacityType:
          description: Optional capacity type within the hardware tier.
          example: on-demand
          type: string
        commitId:
          description: >-
            Git commitId to start job from. Defaults to head commitId for the
            project.
          example: 960a4c99a4cc38194cbacbcce41caa68ba5369ea
          type: string
        computeCluster:
          $ref: '#/components/schemas/ComputeClusterConfigV1'
        environmentId:
          description: >-
            Id of environment to use when creating job. Defaults to project
            default environment.
          example: 623131507a0af0281c01a699
          type: string
        environmentRevisionSpec:
          $ref: '#/components/schemas/EnvironmentRevisionSpecV1'
        externalVolumeMountIds:
          description: Ids of external volumes to be mounted on this job.
          items:
            type: string
          type: array
        hardwareTier:
          description: >-
            Hardware tier to use for this job. Defaults to project default
            hardware tier.
          example: small-k8s
          type: string
        mainRepoGitRef:
          $ref: '#/components/schemas/GitRefV1'
        netAppVolumeIds:
          description: Ids of NetApp volumes to be mounted on this job.
          items:
            type: string
          type: array
        projectId:
          description: Id of project to create job in.
          example: 623130ad7a0af0281c01a698
          type: string
        runCommand:
          description: Command for job to run
          example: main.py
          type: string
        snapshotDatasetsOnCompletion:
          description: >-
            Whether to snapshot datasets mounted on the Job when the Job
            completes.
          type: boolean
        snapshotNetAppVolumesOnCompletion:
          description: >-
            Whether to snapshot NetApp volumes mounted on the Job when the Job
            completes.
          type: boolean
        title:
          description: Name of job to start
          example: K-means clustering
          type: string
      required:
        - projectId
        - runCommand
      type: object
    JobEnvelopeV1:
      properties:
        job:
          $ref: '#/components/schemas/JobDetailsV1'
        metadata:
          $ref: '#/components/schemas/MetadataV1'
      required:
        - job
        - metadata
      type: object
    ComputeClusterConfigV1:
      properties:
        clusterType:
          $ref: '#/components/schemas/ClusterTypeV1'
        computeEnvironmentId:
          description: Id of compute environment to use.
          example: 623139857a0af0281c01a6a4
          type: string
        computeEnvironmentRevisionSpec:
          $ref: '#/components/schemas/EnvironmentRevisionSpecV1'
        masterHardwareTierId:
          description: Hardware tier to use for master node in compute cluster.
          example: medium-k8s
          type: string
        maxWorkerCount:
          description: >-
            Max number of workers to use in compute cluster. Enables
            auto-scaling for cluster when present.
          example: 10
          type: integer
        workerCount:
          description: >-
            Number of workers to use in compute cluster. Used as min number of
            workers in maxWorkerCount is set.
          example: 4
          type: integer
        workerHardwareTier:
          description: Hardware tier to use for workers in compute cluster.
          example: large-k8s
          type: string
        workerStorageMB:
          description: Disk size in MB for each worker.
          example: 5
          type: number
      required:
        - clusterType
        - computeEnvironmentId
        - workerCount
        - workerHardwareTier
      type: object
    EnvironmentRevisionSpecV1:
      description: >-
        Specification describing which environment revision to use. Defaults to
        "ActiveRevision"
      example: ActiveRevision | LatestRevision | SomeRevision(623131577a0af0281c01a69a)
      type: string
    GitRefV1:
      properties:
        refType:
          description: The type of git reference being used.
          example: head | commitId | tags | branches
          type: string
        value:
          description: >-
            The value of the git reference. Only necessary for relevant git ref
            types.
          example: my-test-branch
          type: string
      required:
        - refType
      type: object
    JobDetailsV1:
      properties:
        commentsCount:
          type: integer
        commitDetails:
          $ref: '#/components/schemas/CommitDetailsV1'
        computeCluster:
          $ref: '#/components/schemas/ComputeClusterConfigV1'
        datasetMounts:
          items:
            $ref: '#/components/schemas/DatasetMountV1'
          type: array
        dominoStats:
          items:
            $ref: '#/components/schemas/DominoStatsV1'
          type: array
        externalVolumeMounts:
          items:
            $ref: '#/components/schemas/ExternalVolumeMountV1'
          type: array
        gitRepos:
          items:
            $ref: '#/components/schemas/MountedGitRepoV1'
          type: array
        goalIds:
          items:
            type: string
          type: array
        id:
          type: string
        mainRepoGitRef:
          $ref: '#/components/schemas/GitRefV1'
        netAppVolumeMounts:
          items:
            $ref: '#/components/schemas/NetAppVolumeMountV1'
          type: array
        number:
          type: integer
        projects:
          items:
            $ref: '#/components/schemas/MountedProjectV1'
          type: array
        queuedJobStatusDetails:
          $ref: '#/components/schemas/QueuedJobStatusDetailsV1'
        runCommand:
          type: string
        runLauncherId:
          type: string
        stageTimes:
          $ref: '#/components/schemas/StageTimesV1'
        startedById:
          type: string
        status:
          $ref: '#/components/schemas/JobStatusV1'
        tags:
          items:
            $ref: '#/components/schemas/TagV1'
          type: array
        title:
          type: string
        usage:
          $ref: '#/components/schemas/JobUsageV1'
      required:
        - id
        - number
        - stageTimes
        - tags
        - runCommand
        - commentsCount
        - commitDetails
        - dominoStats
        - status
        - projects
        - gitRepos
        - datasetMounts
        - externalVolumeMounts
        - netAppVolumeMounts
        - goalIds
      type: object
    MetadataV1:
      properties:
        notices:
          description: Notices relating to the request
          items:
            type: string
          type: array
        requestId:
          type: string
      required:
        - requestId
        - notices
      type: object
    FailureEnvelopeV1:
      properties:
        errors:
          description: Errors that caused a request to fail
          items:
            type: string
          type: array
        requestId:
          description: Id used to correlate a request with server actions.
          example: bbd78579-93c4-45ee-a983-0d5c8da6d5b1
          type: string
      required:
        - requestId
        - errors
      type: object
    ClusterTypeV1:
      description: Type of compute cluster
      enum:
        - dask
        - mpi
        - ray
        - slurm
        - spark
      type: string
    CommitDetailsV1:
      properties:
        inputCommitId:
          description: CommitId at execution start.
          example: f1dafe322c7d4a6720f652c330fe33b014720e46
          type: string
        outputCommitId:
          description: >-
            CommitId at execution end. May be empty if execution caused no new
            commits.
          example: e1f06e5f64cfc26c2b70e405f70b7c8300d8a4ed
          type: string
      required:
        - inputCommitId
      type: object
    DatasetMountV1:
      properties:
        containerPath:
          description: Location dataset is mounted at in the Job.
          example: /domino/datasets/local/quick-start
          type: string
        datasetName:
          description: Name of dataset to be mounted.
          example: MyDataset
          type: string
        id:
          description: Id of dataset to be mounted.
          example: 623137f57a0af0281c01a6a0
          type: string
        isInput:
          description: >-
            Whether a dataset was an input to be used in the execution, or an
            output created by the execution.
          example: true
          type: boolean
        projectId:
          description: Id of project the dataset belongs to.
          example: 6231383c7a0af0281c01a6a1
          type: string
        snapshotId:
          description: Id of snapshot to mount for this dataset.
          example: 623138807a0af0281c01a6a2
          type: string
        snapshotVersion:
          description: Version of dataset snapshot to mound.
          example: 2
          type: integer
      required:
        - id
        - datasetName
        - projectId
        - isInput
      type: object
    DominoStatsV1:
      properties:
        name:
          description: The key name in the domino stats.
          example: R-squared
          type: string
        value:
          description: The value for the key in the domino stats
          example: 0.89
          type: string
      required:
        - name
        - value
      type: object
    ExternalVolumeMountV1:
      properties:
        mountPath:
          description: Path to mount the external volume at.
          example: /path/to/my/volume
          type: string
        name:
          description: Name of external volume to mount.
          example: MyExternalVolume
          type: string
        readOnly:
          description: Whether to mount the volume as read only.
          example: false
          type: boolean
        subPath:
          description: >-
            Path within the external volume to mount. The entire volume will be
            mounted if not specified.
          example: /mypath
          type: string
      required:
        - name
        - mountPath
        - readOnly
      type: object
    MountedGitRepoV1:
      properties:
        endingBranch:
          description: Branch this git repo ended at.
          example: final-branch
          type: string
        endingCommitId:
          description: Ending commitId for this git repo.
          example: dff155c9a736f9cd230eac420e3c1ef3daa0ad7e
          type: string
        id:
          description: Id of the git repo mounted to the Job.
          example: 6231365e7a0af0281c01a69f
          type: string
        name:
          description: Name of the git repo mounted to the Job.
          example: MyRepo
          type: string
        ref:
          type: string
        serviceProvider:
          $ref: '#/components/schemas/GitServiceProviderV1'
        startingBranch:
          description: Branch this git repo started at.
          example: init-test-branch
          type: string
        startingCommitId:
          description: CommitId the git repo should be mounted at.
          example: 4f2d5c2f54db4fbb16a093d4fb11fdb1fe0794c7
          type: string
        uri:
          description: Uri for the repo being mounted.
          example: git@github.com:apache/spark.git
          type: string
      required:
        - id
        - name
        - uri
        - ref
        - serviceProvider
      type: object
    NetAppVolumeMountV1:
      properties:
        name:
          description: Name of Domino NetApp Volume to mount.
          example: MyVolume
          type: string
        otherMounts:
          description: Additional mounts for the NetApp Volume.
          items:
            properties:
              mountPath:
                description: Path to mount the volume.
                example: /path/to/other/mount
                type: string
              readOnly:
                description: Whether to mount the volume as read only.
                example: true
                type: boolean
              subPath:
                description: >-
                  Path within the volume to mount. The entire volume will be
                  mounted if not specified.
                example: /other/subPath
                type: string
            required:
              - mountPath
              - readOnly
            type: object
          type: array
        snapshotMountPath:
          description: Path to mount the Snapshot directory of the Volume at.
          example: /path/to/my/snapshot
          type: string
        snapshotReadOnly:
          description: Whether to mount the Snapshot directory as read only.
          example: false
          type: boolean
        snapshotSubPath:
          description: >-
            Path within the Snapshot directory to mount. The entire Snapshot
            directory will be mounted if not specified.
          example: /my/snapshot/subPath
          type: string
        volumeMountPath:
          description: Path to mount the Domino NetApp Volume at.
          example: /path/to/my/volume
          type: string
        volumeReadOnly:
          description: Whether to mount the Volume as read only.
          example: false
          type: boolean
        volumeSubPath:
          description: >-
            Path within the Domino NetApp Volume to mount. The entire Volume
            will be mounted if not specified.
          example: /my/volume/subPath
          type: string
      required:
        - name
        - volumeMountPath
        - volumeReadOnly
        - snapshotMountPath
        - snapshotReadOnly
      type: object
    MountedProjectV1:
      properties:
        commitId:
          description: CommitId to use for project being mounted.
          example: 7f8e3908f129c0ca6529028618e6f10b3d2f315a
          type: string
        projectId:
          description: Id of project to mount.
          example: 623138c87a0af0281c01a6a3
          type: string
      required:
        - projectId
        - commitId
      type: object
    QueuedJobStatusDetailsV1:
      properties:
        expectedWait:
          description: Message describing estimated wait time between state changes.
          example: Now
          type: string
        explanation:
          description: Message explaining the wait time
          example: Your run has been assigned to a machine
          type: string
        helpText:
          description: Message informing the caller what should be done next
          example: It will start being prepared for execution momentarily
          type: string
      required:
        - expectedWait
        - explanation
        - helpText
      type: object
    StageTimesV1:
      properties:
        completedTime:
          description: When the job completed
          example: '2022-03-12T02:16:43.127Z'
          format: date-time
          type: string
        startTime:
          description: When the job started
          example: '2022-03-12T02:15:44.848Z'
          format: date-time
          type: string
        submissionTime:
          description: When the start job request was submitted.
          example: '2022-03-12T02:13:44.467Z'
          format: date-time
          type: string
      required:
        - submissionTime
      type: object
    JobStatusV1:
      properties:
        executionStatus:
          description: Current status of the job.
          example: Succeeded
          type: string
        isArchived:
          description: Whether a job is archived.
          example: false
          type: boolean
        isCompleted:
          description: Whether a job is complete.
          example: true
          type: boolean
        isScheduled:
          description: Whether a job was started by a scheduled trigger.
          example: false
          type: boolean
      required:
        - isCompleted
        - isArchived
        - isScheduled
        - executionStatus
      type: object
    TagV1:
      properties:
        createdAt:
          description: When the tag was created.
          example: '2022-03-15T21:48:36.586Z'
          format: date-time
          type: string
        creatorId:
          description: Id of the user who created the tag.
          example: 6231342b7a0af0281c01a69e
          type: string
        id:
          description: Id of the tag.
          example: 623133e87a0af0281c01a69d
          type: string
        name:
          description: Name of the tag.
          example: KMeansTest
          type: string
      required:
        - id
        - name
        - creatorId
        - createdAt
      type: object
    JobUsageV1:
      properties:
        cpuPercentage:
          description: Max cpu usage for a job as a percentage of the total available cpu.
          example: 5
          type: number
        memoryGiB:
          description: Max memory usage for a job in GiB.
          example: 0.73
          type: number
      required:
        - cpuPercentage
        - memoryGiB
      type: object
    GitServiceProviderV1:
      description: Git service provider
      enum:
        - bitbucket
        - bitbucketServer
        - github
        - githubEnterprise
        - gitLab
        - gitLabEnterprise
        - unknown
      type: string
  responses:
    '400':
      content:
        application/json:
          schema:
            properties:
              error:
                type: string
            type: object
      description: Bad Request
    '401':
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/FailureEnvelopeV1'
      description: >-
        The current user cannot perform this operation because they are not
        logged in
    '403':
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/FailureEnvelopeV1'
      description: The current user is not authorized to perform this operation
    '404':
      content:
        application/json:
          schema:
            properties:
              error:
                type: string
            type: object
      description: Not Found
    '500':
      content:
        application/json:
          schema:
            properties:
              error:
                type: string
            type: object
      description: Internal Server Error
  securitySchemes:
    DominoApiKey:
      in: header
      name: X-Domino-Api-Key
      type: apiKey
    BearerAuthentication:
      in: header
      name: Authorization
      type: apiKey

````