Runs
post/runs

Request

  • Base URL
    https://api.deepnote.com/v2
  • URL
    https://api.deepnote.com/v2/runs
  • Auth
    HTTP bearer

Request body

notebookIdstring required

ID of the notebook to run.

detachedboolean

Run the notebook as a detached run so it does not affect the live editor session. Defaults to true; set to false to execute in the live editor kernel, reuse its state, and update outputs in the live app editor.

detachedRunStorageMode'read_write' | 'readonly'

Storage mode for the detached run. read_write (default) mounts project storage as writable; readonly mounts it as read-only so the run cannot modify the persistent project storage, but can create ephemeral files outside of the persistent project storage directory. Only applies to detached runs.

machineTypestring

Machine type for the run, as an id from GET /machine-types. Defaults to the project's machine type. Only supported for detached runs.

blockIdsstring[]

Optional non-empty list of unique block IDs to run. Only supported in live mode, so set detached to false when providing it. Omit to run the full notebook. Without runDependentBlocks, selected blocks run in request order except that selected input blocks with values in inputs run first. Input blocks with values in inputs that are not selected also run before the selected blocks.

runDependentBlocksboolean

When true and blockIds is provided, also run downstream blocks that depend on the selected blocks.

inputsobject

Input values used when this run executes, keyed by the input name returned from GET /notebooks/{notebookId}. Values must match the referenced input block type. In live mode (detached: false), these values can remain in the editor kernel and affect later executions until overwritten or the kernel is restarted. They do not change the notebook's saved input values.

Example request

{
  "machineType": "ocean"
}

Response

Run started

runIdstring uuid required
status'pending' | 'running' | 'success' | 'error' | 'internal_error' | 'stopped' required
createdAtstring date-time required

Changes

    • info

      the response's property pattern was changed from ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$ to ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$ for the status

    • info

      added the new optional request property