Notebooks
For instructions on how to authenticate to use this endpoint, see API overview.
Endpoints
POST | |
POST | |
GET | |
POST | |
POST | |
GET | |
POST | |
GET | |
POST | |
GET | |
POST | |
POST | |
GET | |
GET | |
GET | |
GET | |
GET | |
GET |
Create notebooks kernel restart
The API for interacting with Notebooks. This feature is in early access and the API can have breaking changes without announcement.
Path parameters
- short_idstring
Request parameters
- titlestringnull
- content
- text_contentstringnull
- versioninteger
- deletedboolean
- variablesarray
- _create_in_folderstring
Example request
POST /api /projects /:project_id /notebooks /:short_id /kernel /restartExample response
Status 200 No response body
Create notebooks kernel start
The API for interacting with Notebooks. This feature is in early access and the API can have breaking changes without announcement.
Path parameters
- short_idstring
Request parameters
- titlestringnull
- content
- text_contentstringnull
- versioninteger
- deletedboolean
- variablesarray
- _create_in_folderstring
Example request
POST /api /projects /:project_id /notebooks /:short_id /kernel /startExample response
Status 200 No response body
Retrieve notebooks kernel status
Live-checked kernel runtime state for this notebook, its compute configuration, and the catalog of dataframes/tables a cell can currently reference (with column schemas).
Required API key scopes
notebook:readPath parameters
- short_idstring
Response
Example request
GET /api /projects /:project_id /notebooks /:short_id /kernel /statusExample response
Status 200
Create notebooks kernel stop
The API for interacting with Notebooks. This feature is in early access and the API can have breaking changes without announcement.
Path parameters
- short_idstring
Request parameters
- titlestringnull
- content
- text_contentstringnull
- versioninteger
- deletedboolean
- variablesarray
- _create_in_folderstring
Example request
POST /api /projects /:project_id /notebooks /:short_id /kernel /stopExample response
Status 200 No response body
Create notebooks sql v2 run
Dispatch an asynchronous run of a notebook SQL or Python cell. Returns a run_id immediately; poll the run result endpoint until the status is terminal. One run at a time per notebook. Flag-gated (revamped-py-notebooks).
Required API key scopes
notebook:writequery:readPath parameters
- short_idstring
Request parameters
- node_idstring
- node_typeDefault:
hogql - codestring
- output_namestringDefault:
- refsobject
- variablesarray
- connection_idstringnull
- send_raw_querybooleanDefault:
false
Response
Example request
POST /api /projects /:project_id /notebooks /:short_id /sql_v2 /runExample response
Status 200
Status 409 The notebook already has a cell running. Wait for it to finish, then run this one. A conflict with the notebook's state rather than a rate, so it is not worth retrying on a timer.
Status 429 The project has as many notebook cells in flight as it may. Unlike the 409, retrying shortly is the right response.
Retrieve notebooks sql v2 runs
Read a run's durable state: its status, and — once done or interrupted — the result envelope (columns, first rows, stdout/stderr, media, error). Poll until terminal. Flag-gated (revamped-py-notebooks).
Required API key scopes
notebook:readquery:readPath parameters
- run_idstring
- short_idstring
Response
Example request
GET /api /projects /:project_id /notebooks /:short_id /sql_v2 /runs /:run_idExample response
Status 200
Create notebooks sql v2 runs interrupt
Stop a running cell. Idempotent: interrupting an already-finished run returns its outcome unchanged. Flag-gated (revamped-py-notebooks).
Required API key scopes
notebook:writePath parameters
- run_idstring
- short_idstring
Response
Example request
POST /api /projects /:project_id /notebooks /:short_id /sql_v2 /runs /:run_id /interruptExample response
Status 200
Status 202
Retrieve notebooks sql v2 state
The full notebook view for agents: title, document source (markdown, or raw content for legacy rich-text notebooks), every cell with its dependency edges and derived run status (including staleness), and the kernel's runtime state and compute config. Flag-gated (revamped-py-notebooks).
Required API key scopes
notebook:readquery:readPath parameters
- short_idstring
Response
Example request
GET /api /projects /:project_id /notebooks /:short_id /sql_v2 /stateExample response
Status 200
Create notebooks widget
The API for interacting with Notebooks. This feature is in early access and the API can have breaking changes without announcement.
Required API key scopes
notebook:writePath parameters
- node_idstring
- short_idstring
Request parameters
- generation_idstring
Example request
POST /api /projects /:project_id /notebooks /:short_id /widgets /:node_id /cancelExample response
Status 204 No response body
Status 400
Status 404
Retrieve notebooks widget
The API for interacting with Notebooks. This feature is in early access and the API can have breaking changes without announcement.
Required API key scopes
notebook:readquery:readPath parameters
- frame_namestring
- node_idstring
- short_idstring
Query parameters
- limitinteger
- offsetinteger
- run_idstring
- version_idstring
Response
Example request
GET /api /projects /:project_id /notebooks /:short_id /widgets /:node_id /frames /:frame_nameExample response
Status 200
Status 403
Status 404
Status 409
Status 429
Create notebooks widget
The API for interacting with Notebooks. This feature is in early access and the API can have breaking changes without announcement.
Required API key scopes
notebook:writequery:readPath parameters
- node_idstring
- short_idstring
Request parameters
- promptstring
- generation_idstring
- modelDefault:
claude-sonnet-4-6 - generation_operationDefault:
regenerate - expected_current_version_idstring
Response
Example request
POST /api /projects /:project_id /notebooks /:short_id /widgets /:node_id /generateExample response
Status 202
Status 400
Status 403
Status 404
Status 409
Status 429
Create notebooks widget
The API for interacting with Notebooks. This feature is in early access and the API can have breaking changes without announcement.
Required API key scopes
notebook:writePath parameters
- node_idstring
- short_idstring
Request parameters
- version_idstring
- expected_current_version_idstring
Response
Example request
POST /api /projects /:project_id /notebooks /:short_id /widgets /:node_id /revertExample response
Status 200
Status 400
Status 404
Status 409
Status 429
Retrieve notebooks widget
The API for interacting with Notebooks. This feature is in early access and the API can have breaking changes without announcement.
Required API key scopes
notebook:readPath parameters
- node_idstring
- short_idstring
Query parameters
- version_idstring
Response
Example request
GET /api /projects /:project_id /notebooks /:short_id /widgets /:node_id /sourceExample response
Status 200
Status 400
Status 404
Retrieve notebooks widget
The API for interacting with Notebooks. This feature is in early access and the API can have breaking changes without announcement.
Required API key scopes
notebook:readPath parameters
- node_idstring
- short_idstring
Response
Example request
GET /api /projects /:project_id /notebooks /:short_id /widgets /:node_id /statusExample response
Status 200
Status 404
Retrieve notebooks widget
The API for interacting with Notebooks. This feature is in early access and the API can have breaking changes without announcement.
Required API key scopes
notebook:readPath parameters
- node_idstring
- short_idstring
Query parameters
- limitinteger
- offsetinteger
Response
Example request
GET /api /projects /:project_id /notebooks /:short_id /widgets /:node_id /versionsExample response
Status 200
Status 404
Retrieve notebooks all activity
The API for interacting with Notebooks. This feature is in early access and the API can have breaking changes without announcement.
Example request
GET /api /projects /:project_id /notebooks /activityExample response
Status 200 No response body
Retrieve notebooks kernel compute options
Compute rates, presets, and the sizes the kernel config endpoint accepts. Static per region, so a client can fetch it once and price any shape a user picks.
Required API key scopes
notebook:readResponse
Example request
GET /api /projects /:project_id /notebooks /kernel /compute_optionsExample response
Status 200
Retrieve notebooks recording comments
The API for interacting with Notebooks. This feature is in early access and the API can have breaking changes without announcement.
Example request
GET /api /projects /:project_id /notebooks /recording_comments