You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Creates a kernel session to run user-input code snippets.
Parameters
Parameter
Description
lang
The kernel type, usually the name of one of our supported programming languages.
clientSessionToken
Client session token. Should be unique for continuous execution (for REPL).
resourceLimits
An optional argument to specify resource requirements.
Additional charges may apply on the public API service.
If the requested limits exceeds our internal hard-limits,
the API may return HTTP 406 "Not acceptable".
The requested resource limits exceed the server's own limits.
Fields
Values
kernelId
The kernel ID used for later API calls.
Example:
{
"kernelId": "TSSJT2Z4SnmQhxjWMnJljg"
}
Getting kernel information
URI: /v1/kernel/:id
Method: GET
Retrieves information about a kernel session.
For performance reasons, the returned information may not be real-time; usually they are updated every a few seconds in the server-side.
Parameters
Parameter
Description
:id
The kernel ID.
Response
HTTP Status Code
Description
200 OK
The information is successfully returned.
404 Not Found
There is no such kernel.
Fields
Values
lang
The kernel type.
age
The time elapsed since the kernel has started in milliseconds.
idle
The time elapsed since the kernel has generated any output in milliseconds.
queryTimeout
The timeout for executing each query (the time between accepting a query and receiving the output) in milliseconds.
If exceeded, the kernel is automatically destroyed.
idleTimeout
The maximum duration between queries in milliseconds.
If exceeded, the kernel is automatically destroyed.
maxCpuCredit
The maximum amount of CPU time that this kernel can use in milliseconds.
If exceeded, the kernel is automatically destroyed.
If zero, there is no limit imposed.
numQueriesExecuted
The total number of queries executed after start-up.
memoryUsed
The amount of memory that this kernel is using now in KB.
cpuCreditUsed
The amount of CPU time that this kernel has used so far in milliseconds.
Restarts a kernel session.
The idle time of the kernel will be reset, but other properties such as the age and CPU credit will continue to accumulate.
All global states such as global variables and modules imports are also reset.