Notebooks
For instructions on how to authenticate to use this endpoint, see API overview.
Endpoints
POST | |
POST | |
GET | |
POST | |
POST | |
GET | |
POST | |
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
- _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
- _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
- _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. 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
- connection_idstringnull
- send_raw_querybooleanDefault:
false
Response
Example request
POST /api /projects /:project_id /notebooks /:short_id /sql_v2 /runExample response
Status 200
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
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 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