latestOpenAPI 3.1.02026-08-204489152.5 KB

726970fd2992

Sessions

Execute arbitrary code in a session kernel (debug)

Runs arbitrary code inside the notebook's kernel within an interactive session and returns the raw outputs (without creating a snapshot). User-code exceptions are returned as error outputs inside the response body and still produce HTTP 200.

post/sessions/{sessionId}/execute

Path parameters

sessionIdstring uuid required

Session identifier.

Session identifier.

Request body

notebookIdstring required

Source notebook to execute against in the session. Use the session's source notebook ID (session.notebookId), not sessionNotebookId.

codestring required

Source code to execute in the session sandbox.

timeoutMsinteger

Maximum execution time in milliseconds. Must be a positive integer no greater than 120000. Values outside this range are rejected with 400; the server does not clamp. Defaults to 10000 when omitted.

Response

Outputs produced by the synchronous execution.