v3

latestSwagger 2.02026-07-13112135.6 KB

Execute code in a session. This is only supported for code-interpreter session pools.

post/executions

Query parameters

api-versionstring required

The API version to use for this operation.

identifierstring required

The user-assigned identifier of the session.

Headers

operation-idstring

The id of this execution operation.

Request body

codeInputType'Inline' | 'InlineBase64' | 'InlineText'

Code input type.

executionType'Synchronous' | 'Asynchronous'

Execution Type

codestring

The string of the code to execute, based on CodeInputType.

timeoutInSecondsinteger required

Execution timeout in seconds.

outputStreamsMaxLengthinteger

The maximum length of the output streams. Default value is 4096.

useEmptyKernelboolean

Whether to use empty kernel for this execution. Default is false.

returnJupyterFormatExecutionResultboolean

Whether to formats primitive Python results (bool, int, float, string, None) as JSON strings or null. Default to false.

shellCommandstring

Shell command to execute in Bash. Only available for a Shell typed session pool. Cannot coexist with execCommandAndArgs.

execCommandAndArgsstring[]

The executable and its arguments. Only available for a Shell typed session pool. Cannot coexist with shellCommand.

stdinstring

The standard input of the shell command execution. Only available for a Shell typed session pool.

Response

The request has succeeded.

idstring required

Session code execution id.

identifierstring required

The identifier of the session.

executionType'Synchronous' | 'Asynchronous'

Execution Type

status'NotStarted' | 'Running' | 'Succeeded' | 'Failed' | 'Canceled' required

Enum describing allowed operation states.

All 11 operations