notebooks

Run every SQL and Python cell of a markdown notebook, in document order, stopping at the first cell that does not finish. Returns as soon as the run starts; poll the run status endpoint until the status is terminal. Flag-gated (revamped-py-notebooks).

post/api/projects/{project_id}/notebooks/{short_id}/runs/

Request

  • Base URL: https://us.posthog.com
  • URL: https://us.posthog.com/api/projects/{project_id}/notebooks/{short_id}/runs/
  • Auth: HTTP bearer

Path parameters

project_idstring required

Project ID of the project you're trying to access. To find the ID of the project, make a call to /api/projects/.

short_idstring required

Request body

include_prepared_insightsboolean

Include prepared embedded insights when refreshing a dashboard widget. Requires notebook widgets to be enabled.

Response

run_idstring uuid required

Identifier of the whole-notebook run. Poll the run status endpoint with it until the status is terminal.

cell_countinteger required

How many cells the run will execute, frozen when it started.

starts_sandboxboolean required

True when this run has to provision a sandbox because it holds a Python cell and none is live for the caller. Tell the user what that costs.

sandbox_hourly_pricenumber double nullable

What the sandbox this run provisions costs per hour in USD. Null when the run needs no new sandbox, or when the backend is not charged.

Changes

No recorded changes to this operation across all 1 revision of this API.